pub struct NumberTree<V> { /* private fields */ }Expand description
A parsed number tree mapping integer keys to values of type V.
Implementations§
Source§impl<V> NumberTree<V>
impl<V> NumberTree<V>
Sourcepub fn parse<S: PdfSource, F>(
root: &Object,
store: &ObjectStore<S>,
convert: F,
) -> DocResult<Self>
pub fn parse<S: PdfSource, F>( root: &Object, store: &ObjectStore<S>, convert: F, ) -> DocResult<Self>
Parse a number tree starting from the given root object.
The convert function transforms each value Object into a V.
Traversal is fully iterative using an explicit stack.
Sourcepub fn floor(&self, num: i64) -> Option<&V>
pub fn floor(&self, num: i64) -> Option<&V>
Find the entry with the largest key less than or equal to num.
Corresponds to CPDF_NumberTree::GetFloor() in PDFium.
Trait Implementations§
Source§impl<V: Clone> Clone for NumberTree<V>
impl<V: Clone> Clone for NumberTree<V>
Source§fn clone(&self) -> NumberTree<V>
fn clone(&self) -> NumberTree<V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<V> Freeze for NumberTree<V>
impl<V> RefUnwindSafe for NumberTree<V>where
V: RefUnwindSafe,
impl<V> Send for NumberTree<V>where
V: Send,
impl<V> Sync for NumberTree<V>where
V: Sync,
impl<V> Unpin for NumberTree<V>where
V: Unpin,
impl<V> UnsafeUnpin for NumberTree<V>
impl<V> UnwindSafe for NumberTree<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more