[][src]Struct x509_parser::x509::AttributeTypeAndValue

pub struct AttributeTypeAndValue<'a> {
    pub attr_type: Oid<'a>,
    pub attr_value: DerObject<'a>,
}

Fields

attr_type: Oid<'a>attr_value: DerObject<'a>

Implementations

impl<'a> AttributeTypeAndValue<'a>[src]

pub fn as_str(&self) -> Result<&'a str, X509Error>[src]

Attempt to get the content as str. This can fail if the object does not contain a string type.

Only NumericString, PrintableString, UTF8String and IA5String are considered here. Other string types can be read using as_slice.

pub fn as_slice(&self) -> Result<&'a [u8], X509Error>[src]

Attempt to get the content as a slice. This can fail if the object does not contain a type directly equivalent to a slice (e.g a sequence).

Trait Implementations

impl<'a> Debug for AttributeTypeAndValue<'a>[src]

impl<'a> PartialEq<AttributeTypeAndValue<'a>> for AttributeTypeAndValue<'a>[src]

impl<'a> StructuralPartialEq for AttributeTypeAndValue<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.