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

Safe HaskellSafe-Infered

Data.Conduit.Cereal

Description

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

Synopsis

Documentation

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 GetException will be thrown with resourceThrow. This function itself can also throw a GetException.

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

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