Skip to main content

KeyInfoParsingSession

Struct KeyInfoParsingSession 

Source
pub struct KeyInfoParsingSession<'a> { /* private fields */ }
Expand description

Shared ingestion accounting for KeyInfo elements in one operation.

Parsing charges embedded candidates and X.509 bytes before materialization; these charges are independent of later resolver inspection work and are not refunded when parsing fails. The immutable operation snapshot is borrowed.

Implementations§

Source§

impl<'a> KeyInfoParsingSession<'a>

Source

pub fn with_certificate_public_key<R>( &mut self, der: &[u8], inspect: impl FnOnce(&[u8]) -> R, ) -> Result<R, ParseError>

Inspect original certificate SPKI without constructing display metadata or starting another certificate budget. Parsing does not establish trust. The callback owns any further key conversion and its accounting.

Source

pub fn certificate_matches_selectors( &mut self, info: &X509DataInfo, der: &[u8], provider: &dyn CryptoProvider, ) -> Result<bool, ParseError>

Match a candidate’s selectors in this operation’s retained account.

Source

pub fn new(resources: &'a ResourcePolicy) -> Result<Self, ParseError>

Start a session using the operation’s resource policy.

Source

pub fn parse(&mut self, node: Node<'_, '_>) -> Result<KeyInfo, ParseError>

Parse another element without resetting this operation’s allowance.

Source

pub fn parse_with_provider( &mut self, node: Node<'_, '_>, provider: &dyn CryptoProvider, ) -> Result<KeyInfo, ParseError>

Parse with the operation’s explicit crypto engine and existing allowance.

Auto Trait Implementations§

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> Same for T

Source§

type Output = T

Should always be Self
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.