Skip to main content

PageTreeNode

Struct PageTreeNode 

Source
pub struct PageTreeNode { /* private fields */ }
Expand description

Intermediate page nodes, and the type of the Pages element in the document’s Catalog.

From the PDF specification:

The simplest structure can consist of a single page tree node that references all of the document’s page objects directly. However, to optimise application performance, a PDF writer can construct trees of a particular form, known as balanced trees.

In Livre, the page tree is immediately transformed into a vector of Pages for simplicity. Hence this type, along with other low-level types, are made public for reference only.

Implementations§

Source§

impl PageTreeNode

Source

pub fn list_pages<B>(&self, builder: &B) -> PResult<Vec<Page>>
where B: Builder,

Trait Implementations§

Source§

impl Build for PageTreeNode

Source§

fn build<B>(input: &mut &BStr, _: &B) -> PResult<Self>
where B: Builder,

Build an object that rely on a reference, which would be instantiated with the help of the supplied builder. Read more
Source§

impl Clone for PageTreeNode

Source§

fn clone(&self) -> PageTreeNode

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 PageTreeNode

Source§

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

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

impl<'de> FromRawDict<'de> for PageTreeNode

Source§

fn from_raw_dict(dict: &mut RawDict<'de>) -> PResult<Self>

Build a type from a raw dictionary. Note that the supplied dict is not consumed. Rather, the method takes hold of a mutable reference to extract only the fields that are needed, removing them from the dictionary. Read more
Source§

impl PartialEq for PageTreeNode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PageTreeNode

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<'de, T> Extract<'de> for T
where T: FromRawDict<'de>,

Source§

fn extract(input: &mut &'de BStr) -> Result<T, ErrMode<ContextError>>

Source§

fn recognize(input: &mut &'de BStr) -> PResult<&'de [u8]>

Consume the input, without trying to parse. 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 = 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.