Skip to main content

RoleSyntax

Struct RoleSyntax 

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

A complete DER role assertion, borrowing the original document. Authority metadata retains its capacity charge independently of the shorter query.

Implementations§

Source§

impl<'a> RoleSyntax<'a>

Source

pub fn read(parent: &mut ScopedReader<'a, '_>) -> Result<Self>

Reads exactly one standalone role value. AC signed information is DER even when a BER envelope carries it (RFC5755 §4.1).

Source

pub fn read_element( parent: &ScopedReader<'a, '_>, element: &Element<'a>, ) -> Result<Self>

Reads an original element under its producing source/depth and current execution. All fields and trailing bytes are checked before success.

Source

pub fn read_attribute<W: Work>( attribute: &Attribute<'a>, work: &W, ) -> Result<OwnedVec<Self>>

Reads every value of one registered id-at-role Attribute in source order. RFC5755 §4.4.5 permits multiple values, unlike group/charging singleton syntax. Empty or invalid later values refuse the whole read; no successful partial catalogue or authorization fact is returned.

Source

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

Original whole RoleSyntax encoding.

Source

pub fn authority(&self) -> Option<&[GeneralName<'a>]>

Optional original authority names, not authenticated by this reader.

Source

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

Original [0] IMPLICIT GeneralNames, if written.

Source

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

Original mandatory [1] EXPLICIT GeneralName wrapper.

Source

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

Original URI CHOICE element, inside the explicit wrapper.

Source

pub fn name(&self) -> &'a str

Original validated URI, without normalization, copying or acquisition.

Trait Implementations§

Source§

impl<'a> Debug for RoleSyntax<'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 RoleSyntax<'a>

§

impl<'a> RefUnwindSafe for RoleSyntax<'a>

§

impl<'a> Send for RoleSyntax<'a>

§

impl<'a> Sync for RoleSyntax<'a>

§

impl<'a> Unpin for RoleSyntax<'a>

§

impl<'a> UnsafeUnpin for RoleSyntax<'a>

§

impl<'a> UnwindSafe for RoleSyntax<'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.