pub struct Extension<'a> { /* private fields */ }Expand description
One extension: what it is, whether it must be understood, and its value.
Implementations§
Source§impl<'a> Extension<'a>
impl<'a> Extension<'a>
Sourcepub fn is_critical(self) -> bool
pub fn is_critical(self) -> bool
Whether a relying party that does not understand this extension must refuse the certificate.
Sourcepub fn value(self) -> &'a [u8] ⓘ
pub fn value(self) -> &'a [u8] ⓘ
The value, still encoded: the contents of the octet string the extension wraps it in, which is a structure of its own.
Sourcepub fn reader<W: Work + 'a>(self, execution: &W) -> Result<Reader<'a>>
pub fn reader<W: Work + 'a>(self, execution: &W) -> Result<Reader<'a>>
A reader over the value using the current execution domain and the original parser session’s cumulative ceilings, offsets and depth.
How a scheme reads an extension of its own. Sharing the budget is what keeps a certificate carrying a hundred extensions from costing a hundred times what the caller allowed, and the offsets a reader made this way reports are offsets in the whole document. The wrapped value sits below extnValue and retains the certificate’s depth allowance.
Sourcepub fn reader_scoped<'operation, W: Work>(
self,
execution: &'operation W,
) -> Result<ScopedReader<'a, 'operation>>where
'a: 'operation,
pub fn reader_scoped<'operation, W: Work>(
self,
execution: &'operation W,
) -> Result<ScopedReader<'a, 'operation>>where
'a: 'operation,
Opens original payload bytes under a shorter current operation. Parsed input views keep their source lifetime, while only the cursor/scratch borrows this execution. Depth, source and query admission are unchanged.
Sourcepub fn reader_in<'work>(self, query: &Reader<'work>) -> Result<Reader<'work>>where
'a: 'work,
pub fn reader_in<'work>(self, query: &Reader<'work>) -> Result<Reader<'work>>where
'a: 'work,
Original DER value under both origin and current query ceilings.
The query may come from another source. Original parser identity, offsets and inherited depth are preserved from creation; allocation, traversal and scratch also obey the current operation’s local budget and aggregate account. Previously retained storage is not transferred.