Skip to main content

Object

Struct Object 

Source
pub struct Object<'a, 's, D, G> { /* private fields */ }
Expand description

A stable view into its owning reading. Node handles cannot be constructed publicly, moved between owners or used after their owning storage drops.

Implementations§

Source§

impl<'a, 's, D: Copy + Eq, G: Copy + Eq> Object<'a, 's, D, G>

Source

pub fn location(self) -> Location

Original range and coordinate domain; never a re-encoded value.

Source

pub fn kind(self) -> Type

Category already established by the bounded grammar.

Source

pub fn boolean(self) -> Option<bool>

Original boolean scalar. This O(1) metadata getter does not traverse source data or decide whether the enclosing schema accepts a boolean.

Source

pub fn string_body(self) -> Option<(Form, Location)>

Exact original encoded string body and spelling. Decoding is a separate paid source query; this getter never materializes a potentially large value or mistakes literal/hex delimiters for signature content octets.

§Panics

Panics if a parsed string’s internally retained delimiters are invalid.

Source

pub fn reference(self) -> Option<(u64, u16)>

Original indirect identity, without resolution, implicit I/O or fallback to a different generation’s object.

Source

pub fn unsigned(self, operation: &impl Work) -> Result<u64>

Queries an integer as a nonnegative u64 under current/original work. A wider valid integer is explicitly unsupported for THIS query; it is not saturated, clamped or relabelled malformed during object reading.

Source

pub fn name_equals(self, expected: &[u8], operation: &impl Work) -> Result<bool>

Compares a decoded PDF name with caller bytes, paying before traversal. PDF names have byte identity, without case/Unicode normalization.

Source

pub fn get(self, key: &[u8], operation: &impl Work) -> Result<Option<Self>>

Queries a dictionary by its decoded byte-name through the paid index. Null entries are absent; an equal repeated value retains its FIRST original encoding and a separate format fault. Conflicts never reach this getter. This lookup does not resolve indirect references.

Source

pub fn members<'q>( self, operation: &'q impl Work, ) -> Option<Members<'a, 's, 'q, D, G>>
where 's: 'q,

Original direct member traversal. Dictionaries expose alternating key and value nodes in wire order, arrays expose their ordered elements. Constructor is allocation-free; each step pays before accessing a link. After its first resource error the iterator is fused.

Trait Implementations§

Source§

impl<'a, 's, D: Clone, G: Clone> Clone for Object<'a, 's, D, G>

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<'a, 's, D: Copy, G: Copy> Copy for Object<'a, 's, D, G>

Auto Trait Implementations§

§

impl<'a, 's, D, G> !RefUnwindSafe for Object<'a, 's, D, G>

§

impl<'a, 's, D, G> !Send for Object<'a, 's, D, G>

§

impl<'a, 's, D, G> !Sync for Object<'a, 's, D, G>

§

impl<'a, 's, D, G> !UnwindSafe for Object<'a, 's, D, G>

§

impl<'a, 's, D, G> Forget for Object<'a, 's, D, G>

§

impl<'a, 's, D, G> Freeze for Object<'a, 's, D, G>
where &'a Value<'s, D, G>: Freeze,

§

impl<'a, 's, D, G> Unpin for Object<'a, 's, D, G>
where &'a Value<'s, D, G>: Unpin,

§

impl<'a, 's, D, G> UnsafeUnpin for Object<'a, 's, D, G>
where &'a Value<'s, D, G>: UnsafeUnpin,

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.