Skip to main content

GeneralName

Enum GeneralName 

Source
#[non_exhaustive]
pub enum GeneralName<'a> { Other { type_id: Oid<'a>, value: &'a [u8], }, Email(&'a str), Dns(&'a str), X400(&'a [u8]), Directory(Name<'a>), EdiParty(&'a [u8]), Uri(&'a str), IpAddress(&'a [u8]), RegisteredId(Oid<'a>), }
Expand description

One name, in whichever of the forms the schema allows.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Other

A form defined elsewhere, kept as its identifier and its value.

Fields

§type_id: Oid<'a>

What kind of name this is.

§value: &'a [u8]

The value, as it was encoded.

§

Email(&'a str)

An electronic mail address.

§

Dns(&'a str)

A domain name.

§

X400(&'a [u8])

An X.400 address, kept as encoded because nothing here reads one.

§

Directory(Name<'a>)

A distinguished name, the same kind a certificate’s subject is.

§

EdiParty(&'a [u8])

An EDI party name, kept as encoded.

§

Uri(&'a str)

A location, which is text and is never fetched.

§

IpAddress(&'a [u8])

An address, as the four or sixteen bytes it is written in. In a name constraint this is twice that, the address and then its mask.

§

RegisteredId(Oid<'a>)

A name that is itself an identifier.

Trait Implementations§

Source§

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

§

impl<'a> RefUnwindSafe for GeneralName<'a>

§

impl<'a> Send for GeneralName<'a>

§

impl<'a> Sync for GeneralName<'a>

§

impl<'a> Unpin for GeneralName<'a>

§

impl<'a> UnsafeUnpin for GeneralName<'a>

§

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