pub struct TargetInformation<'a> { /* private fields */ }Expand description
Fully decoded extension, retaining original ranges and independently owned catalogues. The short operation used to read it need not remain alive.
Implementations§
Source§impl<'a> TargetInformation<'a>
impl<'a> TargetInformation<'a>
Sourcepub fn read<W: Work>(extension: &Extension<'a>, work: &W) -> Result<Self>
pub fn read<W: Work>(extension: &Extension<'a>, work: &W) -> Result<Self>
Reads the complete original extension using the shared Extension reader. All alternatives are decoded before any membership callback can run. Catalogues and nested Name storage obey source and current work/capacity admission; no bytes are joined, retagged or re-encoded.
Sourcepub fn is_critical(&self) -> bool
pub fn is_critical(&self) -> bool
Original extension criticality, not inferred from its identifier.
Sourcepub fn groups(&self) -> &[Group<'a>]
pub fn groups(&self) -> &[Group<'a>]
Original groups and their flat target ranges. Traversal by callers must
be admitted by their own current Work; Self::check does this itself.
Sourcepub fn targets(&self) -> &[Target<'a>]
pub fn targets(&self) -> &[Target<'a>]
Original target order, with no implicit sorting or deduplication.
Sourcepub fn certificates(&self) -> &[TargetCertificate<'a>]
pub fn certificates(&self) -> &[TargetCertificate<'a>]
Typed forbidden alternatives, without treating them as accepted targets.
Sourcepub fn check<W: Work, E>(
&self,
recipients: &[GeneralName<'_>],
work: &W,
membership: impl FnMut(&GeneralName<'a>, &Execution<'_>) -> Result<Membership, E>,
) -> Result<Decision, CheckError<E>>
pub fn check<W: Work, E>( &self, recipients: &[GeneralName<'_>], work: &W, membership: impl FnMut(&GeneralName<'a>, &Execution<'_>) -> Result<Membership, E>, ) -> Result<Decision, CheckError<E>>
Tests recipient targeting only. Names must be already-known identities; successfully decode untrusted names before supplying them here.
RFC5755 §4.3.2 requires criticality, prohibits targetCert and treats all
Targets groups as one union. These profile gates run before comparison
or callback effects. A recipient-name match OR confirmed group membership
suffices. Present empty groups match nothing. Other/X.400/EDI recipient
names remain unproven because the shared name core only knows their
encoded identity; their type-specific semantic identity is not inferred.
This is not a complete AC profile check (including GeneralName profile
restrictions), holder authentication or an authorization decision.
membership owns group discovery and must admit its own data-dependent
work through the supplied execution. Unknown membership differs from a
completed negative answer. Errors preserve their cause and original
target span; external callback side effects cannot be rolled back.