pub enum EmitPart<'a> {
Chunk(&'a Chunk),
Verbatim(&'a [u8]),
Form(&'a [u8]),
}Expand description
One child for partial_emit: a parsed Chunk to re-frame, a verbatim
byte slice copied as-is, or a nested FORM container framed from its body.
Variants§
Chunk(&'a Chunk)
Re-frame this chunk through the canonical emitter (8-byte header, payload, word-alignment pad).
Verbatim(&'a [u8])
Copy these bytes into the FORM payload verbatim. Use this for children
whose bytes must be preserved exactly (the byte-preserving path); any
word-alignment pad is added by partial_emit if the slice has odd
length, so callers may pass either padded or unpadded child blocks.
Form(&'a [u8])
Frame a nested FORM container whose body is given verbatim. body
starts with the 4-byte secondary id (DJVU/DJVI/THUM/…); the seam
writes the FORM tag, the big-endian length, the body, and the
word-alignment pad. Use this for the component sub-FORMs of a bundle so
the FORM framing is never hand-rolled at the call site (and so the
component’s start offset is reported by partial_emit_with_offsets).