Skip to main content

SharedObjectHeader

Struct SharedObjectHeader 

Source
pub struct SharedObjectHeader {
    pub first_object_number: u32,
    pub location: u64,
    pub first_page_entries: u32,
    pub section_entries: u32,
    pub bits_group_object_count: u32,
    pub least_length: u64,
    pub bits_length_delta: u32,
}
Expand description

Header for the Shared Object Hint Table (7 items per Annex F.3.2).

Items are numbered 1–7 in the spec; field names here follow the spec text.

§Back-patch fields

  • location (item 2): byte offset of the first object in the shared objects section. Set to 0 (placeholder); back-patched once the real offset is known.
  • least_length (item 6): minimum byte length of an object in the shared objects section. Set to 0 (placeholder); back-patched once the real offset is known.

Fields§

§first_object_number: u32

Item 1 — Object number of the first object in the shared objects section (i.e. the first new number assigned to a Part-3 object).

0 if there are no shared objects (degenerate case).

§location: u64

Item 2 — Byte offset of the first object in the shared objects section.

Placeholder: 0; back-patched once the real offset is known.

§first_page_entries: u32

Item 3 — Number of shared object entries for the first page (= count of Part-3 objects whose referencing_pages includes page 0).

§section_entries: u32

Item 4 — Total number of shared object entries (= plan.shared_hints.len()).

§bits_group_object_count: u32

Item 5 — Bits used for each entry’s nobjects_minus_one value (nbits_nobjects in qpdf).

§least_length: u64

Item 6 — Least byte length of an object in the shared objects section.

Placeholder: 0; back-patched once the real offset is known.

§bits_length_delta: u32

Item 7 — Bits needed to represent the difference between the greatest and least length of an object in the shared objects section (item 2 of the per-shared-object entry).

Since all lengths are 0 (placeholder) at this stage the delta is 0 and bits = 0. The encoder must re-derive bit widths at encode time using the final values after back-patching.

Trait Implementations§

Source§

impl Clone for SharedObjectHeader

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 SharedObjectHeader

Source§

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

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

impl Eq for SharedObjectHeader

Source§

impl PartialEq for SharedObjectHeader

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 SharedObjectHeader

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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.