Skip to main content

Session

Struct Session 

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

Caller-owned lifetime of one PDF source session and its original work ceiling. The existing shared parser owns the same execution boundary used by genuinely carried DER CMS/PKIX values; PDF bytes are not parsed as ASN.1. Source and current-operation work compose through the existing shared execution kernel, without another account, reset or allocator wrapper.

Implementations§

Source§

impl Session

Source

pub fn new(limits: Limits, memory: Memory) -> Self

Constructs trusted session state without allocation or source traversal.

Source

pub fn limits(&self) -> Limits

Immutable caller-selected mechanism ceilings.

Source

pub fn execution(&self) -> Execution<'_>

Original source work and allocation account, without a new cursor or account-owner clone. Every data-dependent operation must admit work.

Source

pub fn query<'a, W: Work>(&'a self, operation: &'a W) -> Execution<'a>

Attaches the current operation while retaining the original source ceiling. Cross-source queries preserve the original root operation; sharing an account does not exempt either ceiling.

Source

pub fn object(&self, location: Location) -> Result<()>

Counts an object before parsing or allocating its representation.

Source

pub fn revision(&self, location: Location) -> Result<()>

Counts a revision before traversing its cross-reference section.

Source

pub fn decode(&self, amount: u64, location: Location) -> Result<()>

Counts potential decoded output before running a decoder. This output allowance is cumulative; discarding storage never refunds completed work.

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> 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, 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.