conduit-extra-1.3.7: Batteries included conduit: adapters for common libraries.
Safe HaskellNone
LanguageHaskell2010

Data.Conduit.ByteString.Builder

Description

Convert a stream of blaze-builder Builders into a stream of ByteStrings.

Works with both blaze-builder < 0.4's Builders and Builder.

Adapted from blaze-builder-enumerator, written by myself and Simon Meier.

Note that the functions here can work in any monad built on top of IO or ST.

Since 1.1.7.0

Synopsis

Conduits from builders to bytestrings

builderToByteString :: forall (m :: Type -> Type). PrimMonad m => ConduitT Builder ByteString m () #

unsafeBuilderToByteString :: forall (m :: Type -> Type). PrimMonad m => ConduitT Builder ByteString m () #

builderToByteStringWith :: forall (m :: Type -> Type). PrimMonad m => BufferAllocStrategy -> ConduitT Builder ByteString m () #

Flush

builderToByteStringFlush :: forall (m :: Type -> Type). PrimMonad m => ConduitT (Flush Builder) (Flush ByteString) m () #

builderToByteStringWithFlush :: forall (m :: Type -> Type). PrimMonad m => BufferAllocStrategy -> ConduitT (Flush Builder) (Flush ByteString) m () #

Buffer allocation strategies

type BufferAllocStrategy = (IO Buffer, Int -> Buffer -> IO (IO Buffer)) #