-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | data serialization/deserialization conduit library
--   
--   The binary-conduit package. Allow binary serialization using iterative
--   conduit interface.
@package binary-conduit
@version 1.3.1

module Data.Conduit.Serialization.Binary

-- | Runs default Decoder repeatedly on a input stream.
conduitDecode :: forall b (m :: Type -> Type). (Binary b, MonadThrow m) => ConduitT ByteString b m ()

-- | Runs default encoder on a input stream.
--   
--   This function produces a stream of bytes where for each input value
--   you will have a number of ByteStrings, and no boundary between
--   different values.
conduitEncode :: forall b (m :: Type -> Type). (Binary b, MonadThrow m) => ConduitT b ByteString m ()

-- | Runs default encoder on input stream.
--   
--   This function produces a ByteString per each incomming packet, it may
--   be useful in datagram based protocols. Function maintains following
--   property
--   
--   
--   'conduitMsgEncode' xs == 'CL.map' 'Data.ByteString.encode' =$= 'CL.map' 'LBS.toStrict'
--   
--   
--   This invariant is maintaind by the cost of additional data copy, so if
--   you packets can be serialized to the large data chunks or you
--   interested in iterative packet serialization concider using
--   conduitPutList or conduitPutMany
conduitMsgEncode :: forall (m :: Type -> Type) b. (Monad m, Binary b) => ConduitT b ByteString m ()

-- | Runs getter repeatedly on a input stream.
conduitGet :: forall (m :: Type -> Type) b. MonadThrow m => Get b -> ConduitT ByteString b m ()

-- | Runs putter repeatedly on a input stream, returns an output stream.
conduitPut :: forall (m :: Type -> Type). Monad m => ConduitT Put ByteString m ()

-- | Vectorized variant of conduitPut returning list contains all
--   chunks from one element representation
conduitPutList :: forall (m :: Type -> Type). Monad m => ConduitT Put [ByteString] m ()

-- | Runs putter repeatedly on a input stream. Returns a lazy butestring so
--   it's possible to use vectorized IO on the result either by calling'
--   LBS.toChunks' or by calling send.
conduitPutLBS :: forall (m :: Type -> Type). Monad m => ConduitT Put ByteString m ()

-- | Vectorized variant of conduitPut.
conduitPutMany :: forall (m :: Type -> Type). Monad m => ConduitT Put (Vector ByteString) m ()

-- | Create stream of strict bytestrings from Put value.
sourcePut :: forall (m :: Type -> Type) z. Monad m => Put -> ConduitT z ByteString m ()

-- | Decode message from input stream.
sinkGet :: forall (m :: Type -> Type) b z. MonadThrow m => Get b -> ConduitT ByteString z m b
data ParseError
ParseError :: ByteString -> ByteOffset -> String -> ParseError

-- | Data left unconsumed in single stream input value.
[unconsumed] :: ParseError -> ByteString

-- | Number of bytes consumed from single stream input value.
[offset] :: ParseError -> ByteOffset

-- | Error content.
[content] :: ParseError -> String
instance GHC.Internal.Exception.Type.Exception Data.Conduit.Serialization.Binary.ParseError
instance GHC.Internal.Show.Show Data.Conduit.Serialization.Binary.ParseError
