Skip to main content

Document

Struct Document 

Source
pub struct Document<'model, 'document> { /* private fields */ }
Expand description

Borrowed original document, without an extra parser or storage owner. Holding this borrow prevents mutation of its parsed model. Two wrappers over the SAME model share identity; separately parsed equal bytes do not.

Implementations§

Source§

impl<'m, 'd> Document<'m, 'd>

Source

pub fn new(message: &'m SignedData<'d>, parent: &Reader<'_>) -> Result<Self>

Checks producing-parser provenance before exposing this identity domain.

Source

pub fn message(&self) -> &'m SignedData<'d>

Original full CMS container, including material and parallel signers.

Source

pub fn signer(&self, signer: &SignerInfo<'_>) -> Result<Original<'m, 'd>>

Locates one of the root container’s actual signers, refusing substitutes.

Trait Implementations§

Source§

impl<'m, 'd> Source for Document<'m, 'd>

Source§

type Id = Node

Stable node identity scoped to this document, independent of a borrow. Its trusted HashWork bound covers all hashing/equality bytes so identity indexes can admit their complete work before querying attacker input.
Source§

type Document = DocumentId<'m, 'd>

Stable document identity.
Source§

type Generation = ()

Exact document generation.
Source§

fn snapshot(&self) -> Snapshot<DocumentId<'m, 'd>, ()>

Returns identity/generation in constant time, without allocation or I/O.

Auto Trait Implementations§

§

impl<'model, 'document> !RefUnwindSafe for Document<'model, 'document>

§

impl<'model, 'document> !Send for Document<'model, 'document>

§

impl<'model, 'document> !Sync for Document<'model, 'document>

§

impl<'model, 'document> !UnwindSafe for Document<'model, 'document>

§

impl<'model, 'document> Freeze for Document<'model, 'document>

§

impl<'model, 'document> Unpin for Document<'model, 'document>

§

impl<'model, 'document> UnsafeUnpin for Document<'model, 'document>

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.