pub struct Attributes<'a> { /* private fields */ }Expand description
An original attribute set with independently retained catalogue storage.
Implementations§
Source§impl<'a> Attributes<'a>
impl<'a> Attributes<'a>
Sourcepub fn read(
parent: &Reader<'a>,
element: &Element<'a>,
placement: Placement,
) -> Result<Self>
pub fn read( parent: &Reader<'a>, element: &Element<'a>, placement: Placement, ) -> Result<Self>
Reads nonempty attributes in their trusted schema placement.
RFC5652 §5.3 requires nonempty Signed/UnsignedAttributes. Signed sets are reread under DER through the same parser, not repaired or re-encoded. Generic attributes preserve unknown instances; per-type cardinality and placement checks are separate (§§11.1–11.4, RFC6211 §2). https://www.rfc-editor.org/rfc/rfc5652#section-5.3
Sourcepub fn read_inspection(
parent: &Reader<'a>,
element: &Element<'a>,
placement: Placement,
) -> Result<Self>
pub fn read_inspection( parent: &Reader<'a>, element: &Element<'a>, placement: Placement, ) -> Result<Self>
Reads original attributes while retaining a uniquely bounded empty set.
An empty outer set violates RFC5652 §5.3 and is exposed by Self::fault.
This inspection recovery does not relax signed DER, member syntax or
binding requirements. It preserves presence rather than treating an
invalid written set as absent.
Sourcepub fn fault(&self) -> Option<Error>
pub fn fault(&self) -> Option<Error>
The located nonempty-bound violation, without allocating diagnostics.
Original signed bytes remain available for inspection; this fault must be refused before preparing a cryptographic operation.
Sourcepub fn all<'s>(&'s self, kind: Oid<'s>, execution: &Memory) -> Matching<'s, 'a> ⓘ
pub fn all<'s>(&'s self, kind: Oid<'s>, execution: &Memory) -> Matching<'s, 'a> ⓘ
Searches every instance with the current retained-query account.
Lookup errors are yielded once, then iteration stops. Absence is returned only after the whole admitted search, including its terminal step.
Sourcepub fn all_in<'s>(
&'s self,
kind: Oid<'s>,
parent: &'s Reader<'_>,
) -> Matching<'s, 'a, Execution<'s>> ⓘ
pub fn all_in<'s>( &'s self, kind: Oid<'s>, parent: &'s Reader<'_>, ) -> Matching<'s, 'a, Execution<'s>> ⓘ
Searches through the producing reader’s local and aggregate ceilings.
Sourcepub fn unique_in<'s>(
&'s self,
kind: Oid<'s>,
parent: &'s Reader<'_>,
) -> Result<Option<&'s Attribute<'a>>>
pub fn unique_in<'s>( &'s self, kind: Oid<'s>, parent: &'s Reader<'_>, ) -> Result<Option<&'s Attribute<'a>>>
Requires at most one instance for a specifically singleton attribute type.
Unknown generic types must use Self::all_in instead: RFC5652 §5.3
does not forbid every repeated attribute identifier.
Sourcepub fn signed_bytes(&self) -> Option<[&'a [u8]; 2]>
pub fn signed_bytes(&self) -> Option<[&'a [u8]; 2]>
Original signed octets with only the implicit identifier replaced by SET.
RFC5652 §5.4 requires the SET OF identifier, preserving original DER length/content. Unsigned sets have no such signed range.