cereal-conduit-0.8.0: Turn Data.Serialize Gets and Puts into Sources, Sinks, and Conduits

Safe HaskellNone
LanguageHaskell98

Data.Conduit.Cereal.Internal

Synopsis

Documentation

type ConduitErrorHandler m o = String -> ConduitT ByteString o m () Source #

What should we do if the Get fails?

type SinkErrorHandler m r = forall o. String -> ConduitT ByteString o m r Source #

type SinkTerminationHandler m r = forall o. (ByteString -> Result r) -> ConduitT ByteString o m r Source #

What should we do if the stream is done before the Get is done?

mkConduitGet :: Monad m => ConduitErrorHandler m o -> Get o -> ConduitT ByteString o m () Source #

Construct a conduitGet with the specified ErrorHandler

mkSinkGet :: Monad m => SinkErrorHandler m r -> SinkTerminationHandler m r -> Get r -> ConduitT ByteString o m r Source #

Construct a sinkGet with the specified ErrorHandler and TerminationHandler