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
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.
Sourcepub fn for_token(
issuer: I,
snapshot: Snapshot<D, G>,
signature: N,
property: N,
token: N,
purpose: Purpose,
items: OwnedMap<N, bool, W>,
) -> Self
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.
Sourcepub fn subject(&self) -> N
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.
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.