Expand description
An endian-aware byte writer, the builders’ only primitive.
Fields. Every 4- and 8-byte integer a writer writes (u32, i32,
u64, i64: each count, length, size and offset the builders write,
and every other integer of those widths) is a field. While
with_fields runs a build on the calling thread, the writers number
the fields that build writes, in write order, report each one, and can
write another value in place of any of them. G3b’s mutator
(crate::mutate) builds the gate’s inputs this way, so a field is
changed before anything that follows from it is computed: the bytes a
codec compresses, the size of a block, the entry that holds a file.
Outside with_fields a writer writes what it is given.
Structs§
- Byte
Writer - Little- or big-endian bytes, appended.
- Field
- One field a build wrote (module docs).
Functions§
- with_
fields - Runs
buildon this thread with each field it writes numbered from 0 in write order: fieldnis written asvwhereoverridesholds(n, v)(its lowwidthbytes), and as given otherwise. Returns whatbuildreturned and every field it wrote, with the value it was given. A nested call runs its build with a numbering of its own.