wai-0.2.1: Web Application Interface.

Network.Wai.Source

Contents

Synopsis

Conversions

toEnumerator :: Source -> EnumeratorSource

This function safely converts a Source (where you pull data) to an Enumerator (which pushes the data to you). There should be no significant performance impact from its use, and it uses no unsafe functions.

toLBS :: Source -> IO ByteStringSource

Uses lazy I/O (via unsafeInterleaveIO) to provide a lazy interface to the given Source. Normal lazy I/O warnings apply.

fromLBS :: ByteString -> SourceSource

Convert a lazy bytestring to a Source. This operation does not request lazy I/O.