bytezap-1.6.0: Bytestring builder with zero intermediate allocation
Safe HaskellNone
LanguageGHC2021

Bytezap.Write

Synopsis

Documentation

data Write (lt :: LengthType) s Source #

A Poke buffer write operation with the associated length to be written.

The length may be either exact or a maximum.

TODO strictness?

Instances

Instances details
Monoid (Write lt s) Source #

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

Instance details

Defined in Bytezap.Write.Internal

Methods

mempty :: Write lt s #

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

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

Semigroup (Write lt s) Source #

Sequence the writes, sum the lengths.

Instance details

Defined in Bytezap.Write.Internal

Methods

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

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

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

data LengthType Source #

What a buffer write length field means.

Constructors

ExactLength

Exact length to be written.

MaxLength

Maximum length to be written.