bytezap-1.3.0: Bytestring builder with zero intermediate allocation
Safe HaskellSafe-Inferred
LanguageGHC2021

Bytezap.Write

Synopsis

Documentation

data Write s Source #

A Poke with the associated size it pokes.

Instances

Instances details
Monoid (Write s) Source #

The empty Write is the empty Poke, which writes zero bytes.

Instance details

Defined in Bytezap.Write.Internal

Methods

mempty :: Write s #

mappend :: Write s -> Write s -> Write s #

mconcat :: [Write s] -> Write s #

Semigroup (Write s) Source #

Sequence the Pokes, sum the sizes.

Instance details

Defined in Bytezap.Write.Internal

Methods

(<>) :: Write s -> Write s -> Write s #

sconcat :: NonEmpty (Write s) -> Write s #

stimes :: Integral b => b -> Write s -> Write s #

prim :: forall a s. Prim' a => a -> Write s Source #

replicateByte :: Int -> Word8 -> Write RealWorld Source #

essentially memset