Skip to main content

TargetInformation

Struct TargetInformation 

Source
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>

Source

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.

Source

pub fn element(&self) -> Element<'a>

Original whole extension value SEQUENCE.

Source

pub fn is_critical(&self) -> bool

Original extension criticality, not inferred from its identifier.

Source

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.

Source

pub fn targets(&self) -> &[Target<'a>]

Original target order, with no implicit sorting or deduplication.

Source

pub fn certificates(&self) -> &[TargetCertificate<'a>]

Typed forbidden alternatives, without treating them as accepted targets.

Source

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.

Trait Implementations§

Source§

impl<'a> Debug for TargetInformation<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for TargetInformation<'a>

§

impl<'a> !RefUnwindSafe for TargetInformation<'a>

§

impl<'a> !Send for TargetInformation<'a>

§

impl<'a> !Sync for TargetInformation<'a>

§

impl<'a> !UnwindSafe for TargetInformation<'a>

§

impl<'a> Unpin for TargetInformation<'a>

§

impl<'a> UnsafeUnpin for TargetInformation<'a>

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.