Skip to main content

EmitPart

Enum EmitPart 

Source
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).

Auto Trait Implementations§

§

impl<'a> Freeze for EmitPart<'a>

§

impl<'a> RefUnwindSafe for EmitPart<'a>

§

impl<'a> Send for EmitPart<'a>

§

impl<'a> Sync for EmitPart<'a>

§

impl<'a> Unpin for EmitPart<'a>

§

impl<'a> UnsafeUnpin for EmitPart<'a>

§

impl<'a> UnwindSafe for EmitPart<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.