Skip to main content

Preparation

Struct Preparation 

Source
pub struct Preparation<'p, 'm, 'd, 'a, 's, D, G> { /* private fields */ }
Expand description

Immutable PAdES format preparation. The complete nested CMS participant and token census is borrowed from its owning common preparation unchanged. This is not a signature, authority, chronology or trust verdict.

Implementations§

Source§

impl<'p, 'm, 'd, 'a, 's, D: Copy + Eq, G: Copy + Eq> Preparation<'p, 'm, 'd, 'a, 's, D, G>

Source

pub async fn verify<'v, S, P>( &'v self, document: &'v Document<'s, S>, provider: &'v P, key: WorkingKey<'v>, parent: &Reader<'v>, ) -> Result<Mathematical<'v, 'p, 'm, 'd, 'a, 's, D, G>, CheckError<S::Error, P::Error>>
where S: RangeSource<Document = D, Generation = G>, P: SignatureProvider<'v>, 'm: 'v, 'd: 'v, 'a: 'v, 's: 'v,

Resolves and verifies the original detached root through the common asynchronous CMS driver. The source is constructed here from the exact prepared PDF signature, never accepted as a replacement caller payload.

Source§

impl<'p, 'm, 'd, 'a, 's, D: Copy + Eq, G: Copy + Eq> Preparation<'p, 'm, 'd, 'a, 's, D, G>

Source

pub async fn read<S: RangeSource<Document = D, Generation = G>, W: Work>( document: &Document<'s, S>, container: &'p Container<'a, 's, D, G>, cms: &'p CmsPreparation<'m, 'd>, requested: Level, parent: &Reader<'d>, operation: &W, ) -> Result<Self, PrepareError<S::Error>>

Reads all root obligations before key resolution or payload acquisition. EN319142-1 §§4.1/6.3 Table1 overrides CAdES’s root signing-time field; the existing nested participant/token mechanisms are not reimplemented. https://www.etsi.org/deliver/etsi_EN/319100_319199/31914201/01.02.01_60/en_31914201v010201p.pdf

§Panics

Panics if the inspected signature loses its original Contents member.

Source

pub fn requested(&self) -> Level

Requested level, independent of optional timestamp presence.

Source

pub fn claimed_time(&self) -> Option<Date>

Parsed claimed calendar label, without an occurrence proof.

Source

pub fn placement(&self) -> Option<&Placement>

Actual historical signature-field and certification placement facts.

Source

pub fn findings(&self) -> &[Finding]

Every retained root preparation finding, without successful-subset filtering.

Source

pub fn all_basic_format_requirements_met(&self) -> bool

Only original baseline format facts, before mathematical verification.

Source

pub fn cms(&self) -> &'p CmsPreparation<'m, 'd>

Existing whole CMS/counter/token preparation, not a copied catalogue.

Auto Trait Implementations§

§

impl<'p, 'm, 'd, 'a, 's, D, G> !Freeze for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> !RefUnwindSafe for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> !Send for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> !Sync for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> !UnwindSafe for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> Forget for Preparation<'p, 'm, 'd, 'a, 's, D, G>

§

impl<'p, 'm, 'd, 'a, 's, D, G> Unpin for Preparation<'p, 'm, 'd, 'a, 's, D, G>
where &'p Container<'a, 's, D, G>: Unpin,

§

impl<'p, 'm, 'd, 'a, 's, D, G> UnsafeUnpin for Preparation<'p, 'm, 'd, 'a, 's, D, G>
where &'p Container<'a, '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> 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.