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>
impl<'m, 'd> Document<'m, 'd>
Sourcepub fn new(message: &'m SignedData<'d>, parent: &Reader<'_>) -> Result<Self>
pub fn new(message: &'m SignedData<'d>, parent: &Reader<'_>) -> Result<Self>
Checks producing-parser provenance before exposing this identity domain.
Sourcepub fn message(&self) -> &'m SignedData<'d>
pub fn message(&self) -> &'m SignedData<'d>
Original full CMS container, including material and parallel signers.
Sourcepub fn signer(&self, signer: &SignerInfo<'_>) -> Result<Original<'m, 'd>>
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>
impl<'m, 'd> Source for Document<'m, 'd>
Source§type Id = Node
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>
type Document = DocumentId<'m, 'd>
Stable document identity.
Source§type Generation = ()
type Generation = ()
Exact document generation.
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> Forget 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> 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