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>
impl<N: Copy + Eq + HashWork, D: Copy + Eq, G: Copy + Eq, W: Work, I> Coverage<N, D, G, W, I>
Sourcepub fn new(
_issuer: I,
snapshot: Snapshot<D, G>,
signature: N,
timestamp: N,
purpose: Purpose,
items: OwnedMap<N, bool, W>,
) -> Self
pub fn new( _issuer: I, snapshot: Snapshot<D, G>, signature: N, timestamp: N, purpose: Purpose, items: OwnedMap<N, bool, W>, ) -> Self
The coverage of one timestamp’s input over signature.
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.
Sourcepub fn selects<Q: Query<Id = N, Document = D, Generation = G>>(
&self,
node: N,
query: &Q,
) -> Result<bool, CoverageError<N>>
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.
Sourcepub 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>>
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.
Sourcepub 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>>
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.