small-bytearray-builder-0.3.0.0: Serialize to a small byte arrays

Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.Builder.Bounded.Unsafe

Contents

Synopsis

Types

newtype Builder :: Nat -> Type where Source #

A builder parameterized by the maximum number of bytes it uses when executed.

Constructors

Builder 

Fields

Construct

construct :: (forall s. MutableByteArray s -> Int -> ST s Int) -> Builder n Source #

Constructor for Builder that works on a function with lifted arguments instead of unlifted ones. This is just as unsafe as the actual constructor.

Run

pasteST :: Builder n -> MutableByteArray s -> Int -> ST s Int Source #

This function does not enforce the known upper bound on the size. It is up to the user to do this.

pasteIO :: Builder n -> MutableByteArray RealWorld -> Int -> IO Int Source #

This function does not enforce the known upper bound on the size. It is up to the user to do this.