Skip to main content

Coverage

Struct Coverage 

Source
pub struct Coverage<N: HashWork, D, G, W: Work, I> { /* private fields */ }
Expand description

The original items one timestamp’s prepared input covers in their entirety.

The format layer builds it from the same input selection its token check used: XAdES from canonicalized elements, CAdES from ats-hash-index-v3. Transformed or partial input grants no whole-item coverage. Selection alone does not establish that the timestamp was checked. Only the holder of issuer I builds it, and it binds only evidence of the same issuer.

Implementations§

Source§

impl<N: Copy + Eq + HashWork, D: Copy + Eq, G: Copy + Eq, W: Work, I> Coverage<N, D, G, W, I>

Source

pub fn new( _issuer: I, snapshot: Snapshot<D, G>, signature: N, timestamp: N, purpose: Purpose, items: OwnedMap<N, bool, W>, ) -> Self

Coverage shared by every checked token of ONE property over signature. The format issuer must establish that all those token values use the SAME original input selection (for example XAdES property-defined input). Use Self::for_token when selection depends on a particular member, as it does for successive historical CAdES archives in one Attribute.

items maps each visited original item to whether it is itself a whole covered item; a false entry records a visited container that carries covered descendants but is not an item claim. Requiring the issuer value keeps a caller of the format from supplying a fabricated selection.

Source

pub fn for_token( issuer: I, snapshot: Snapshot<D, G>, signature: N, property: N, token: N, purpose: Purpose, items: OwnedMap<N, bool, W>, ) -> Self

Exact token-bound selection when sibling tokens of the same property have DIFFERENT inputs. Another sibling’s valid proof cannot authenticate this selection merely because its property, signature and source match.

Source

pub fn subject(&self) -> N

Original identity of this input selection for material/census joins. Member-specific inputs use the TOKEN node, while a property-shared selection uses the property. Matching only the enclosing property would conflate successive archives carried by one multivalued Attribute.

Source

pub fn selects<Q: Query<Id = N, Document = D, Generation = G>>( &self, node: N, query: &Q, ) -> Result<bool, CoverageError<N>>

Tests prepared whole-item selection under a current source query. True alone is not proof that any timestamp was mathematically checked.

Source

pub fn covers<Q: Query<Id = N, Document = D, Generation = G>>( &self, evidence: &Verified<N, D, G, I>, node: N, query: &Q, ) -> Result<bool, CoverageError<N>>

Binds item selection to the successful token evidence for this exact original input. This establishes mathematical coverage only; TSA/path/status/chronology acceptance remains separate.

Source

pub fn require_evidence<Q: Query<Id = N, Document = D, Generation = G>>( &self, evidence: &Verified<N, D, G, I>, node: N, query: &Q, ) -> Result<(), CoverageError<N>>

Requires evidence to be the checked token of exactly this input.

Auto Trait Implementations§

§

impl<N, D, G, W, I> !Freeze for Coverage<N, D, G, W, I>

§

impl<N, D, G, W, I> RefUnwindSafe for Coverage<N, D, G, W, I>

§

impl<N, D, G, W, I> Send for Coverage<N, D, G, W, I>
where Snapshot<D, G>: Send, N: Send, Option<N>: Send, OwnedMap<N, bool, W>: Send, PhantomData<I>: Send,

§

impl<N, D, G, W, I> Sync for Coverage<N, D, G, W, I>
where Snapshot<D, G>: Sync, N: Sync, Option<N>: Sync, OwnedMap<N, bool, W>: Sync, PhantomData<I>: Sync,

§

impl<N, D, G, W, I> Unpin for Coverage<N, D, G, W, I>
where Snapshot<D, G>: Unpin, N: Unpin, Option<N>: Unpin, OwnedMap<N, bool, W>: Unpin, PhantomData<I>: Unpin,

§

impl<N, D, G, W, I> UnsafeUnpin for Coverage<N, D, G, W, I>

§

impl<N, D, G, W, I> UnwindSafe for Coverage<N, D, G, W, I>

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.