cereal-conduit-0.0.1: Turn Data.Serialize Gets and Puts into Sources and Sinks

Safe HaskellSafe-Infered



Turn a Get into a Sink and a Put into a Source



sinkGet :: ResourceThrow m => Get output -> Sink ByteString m outputSource

Convert a Get into a Sink. The Get will be streamed bytes until it returns Done or Fail.

If the Get fails, a GetError will be thrown with resourceThrow

sourcePut :: Resource m => Put -> Source m ByteStringSource

Convert a Put into a Source. Runs in constant memory.