Skip to main content

Kid

Enum Kid 

Source
pub enum Kid {
    Invalid,
    Element {
        dict: Dict,
        reference: Option<ObjRef>,
        slot: usize,
        linked: Option<usize>,
    },
    PageContent {
        content_id: i64,
    },
    StreamContent {
        stream_obj_num: u32,
        content_id: i64,
    },
    Object {
        obj_num: u32,
    },
}
Expand description

One entry in a structure element’s kid list.

A slot is always reserved, even when nothing usable sits in it, because the dump walks kid indices and a missing kid contributes a skipped index rather than shifting its siblings.

Variants§

§

Invalid

Nothing usable: absent, the wrong type, or content belonging to a different page.

§

Element

A nested structure element, identified by where it was found.

Two indices live here and they are different spaces: slot is the position in the parent’s /K array and never changes, while linked is an index into the tree’s element table and is filled only once the upward walk actually reaches that element. A kid the walk never reached keeps linked: None and the dump skips it.

Fields

§dict: Dict

The element’s dictionary.

§reference: Option<ObjRef>

Its object reference, when it has one.

§slot: usize

Its position in the parent’s /K, which distinguishes inline kids that share no object number.

§linked: Option<usize>

Its index in the tree’s element table, once linked.

§

PageContent

Marked content in the page’s own content stream.

Fields

§content_id: i64

The /MCID this kid names.

§

StreamContent

Marked content in a stream other than the page’s.

Fields

§stream_obj_num: u32

The stream’s object number, or zero when /Stm is not a reference.

§content_id: i64

The /MCID this kid names.

§

Object

A reference to a page object rather than to content.

Fields

§obj_num: u32

The referenced object’s number, or zero when /Obj is not a reference.

Trait Implementations§

Source§

impl Clone for Kid

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Kid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Kid

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Kid

Auto Trait Implementations§

§

impl Freeze for Kid

§

impl RefUnwindSafe for Kid

§

impl Send for Kid

§

impl Sync for Kid

§

impl Unpin for Kid

§

impl UnsafeUnpin for Kid

§

impl UnwindSafe for Kid

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.