pub struct Attribute<'a> { /* private fields */ }Expand description
One original attribute, preserving all values without interpreting unknown syntax.
Implementations§
Source§impl<'a> Attribute<'a>
impl<'a> Attribute<'a>
Sourcepub fn read(
parent: &Reader<'a>,
element: &Element<'a>,
field: &'static str,
) -> Result<Self>
pub fn read( parent: &Reader<'a>, element: &Element<'a>, field: &'static str, ) -> Result<Self>
Reads one original Attribute using the same field kernel as a CMS
catalogue. A containing schema (for example CAdES claimedAttributes)
decides placement/cardinality; this does not invent a SignerInfo.
Sourcepub fn kind_encoding(&self) -> &'a [u8] ⓘ
pub fn kind_encoding(&self) -> &'a [u8] ⓘ
The original attrType encoding, including its tag and length octets.
Sourcepub fn values(&self) -> &[Element<'a>]
pub fn values(&self) -> &[Element<'a>]
Every original value, including unknown or generically empty value sets.
Sourcepub fn element(&self) -> &Element<'a>
pub fn element(&self) -> &Element<'a>
Whole original attribute element, preserving its producing coordinates. This lets a format enforce a required DER attribute without retagging, serializing or manufacturing a new parser/source.
Sourcepub fn value_reader(
&self,
index: usize,
execution: &Memory,
field: &'static str,
) -> Result<Option<Reader<'a>>>
pub fn value_reader( &self, index: usize, execution: &Memory, field: &'static str, ) -> Result<Option<Reader<'a>>>
Opens one original value in the current account and inherited parser depth.
The index selects this attribute’s catalogue, so a foreign element cannot be rebound to its provenance. No serialized bridge or replacement parser is used. Missing indices are absence; resource refusal remains an error.
Sourcepub fn value_reader_scoped<'operation, W: Work>(
&self,
index: usize,
work: &'operation W,
field: &'static str,
) -> Result<Option<ScopedReader<'a, 'operation>>>where
'a: 'operation,
pub fn value_reader_scoped<'operation, W: Work>(
&self,
index: usize,
work: &'operation W,
field: &'static str,
) -> Result<Option<ScopedReader<'a, 'operation>>>where
'a: 'operation,
Opens an original value under a shorter current operation. Returned
input views retain the document lifetime; only cursor/scratch borrows
work. Lookup, parsing and storage obey both the original session and
current operation. Encoding, offsets and inherited depth are preserved.
A missing index is absence; resource refusal is an error, never absence.
Sourcepub fn value_reader_in<'query>(
&self,
index: usize,
parent: &Reader<'query>,
field: &'static str,
) -> Result<Option<Reader<'query>>>where
'a: 'query,
pub fn value_reader_in<'query>(
&self,
index: usize,
parent: &Reader<'query>,
field: &'static str,
) -> Result<Option<Reader<'query>>>where
'a: 'query,
Opens one original value with producing local and current aggregate work. A foreign parser session refuses before lookup/allocation; it cannot silently replace the current producing ceiling with this value’s old one.