Struct spki::AlgorithmIdentifier[][src]

pub struct AlgorithmIdentifier<'a> {
    pub oid: ObjectIdentifier,
    pub parameters: Option<AlgorithmParameters<'a>>,
}

X.509 AlgorithmIdentifier as defined in RFC 5280 Section 4.1.1.2.

AlgorithmIdentifier  ::=  SEQUENCE  {
     algorithm               OBJECT IDENTIFIER,
     parameters              ANY DEFINED BY algorithm OPTIONAL  }

Fields

oid: ObjectIdentifier

Algorithm OID, i.e. the algorithm field in the AlgorithmIdentifier ASN.1 schema.

parameters: Option<AlgorithmParameters<'a>>

Algorithm parameters.

Implementations

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

pub fn parameters_any(&self) -> Option<Any<'a>>[src]

Get the parameters field as an Any.

This will be None if the parameters are an ObjectIdentifier or Null, so this method should be used for handling any other ASN.1 type besides those two.

pub fn parameters_oid(&self) -> Option<ObjectIdentifier>[src]

Get the parameters field as an ObjectIdentifier.

Returns None if it is absent or not an OID.

Trait Implementations

impl<'a> Clone for AlgorithmIdentifier<'a>[src]

impl<'a> Copy for AlgorithmIdentifier<'a>[src]

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

impl<'a> Eq for AlgorithmIdentifier<'a>[src]

impl<'a> Message<'a> for AlgorithmIdentifier<'a>[src]

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

impl<'a> StructuralEq for AlgorithmIdentifier<'a>[src]

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

impl<'a> TryFrom<&'a [u8]> for AlgorithmIdentifier<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<Any<'a>> for AlgorithmIdentifier<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

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<'a, T> Decodable<'a> for T where
    T: TryFrom<Any<'a>, Error = Error>, 
[src]

impl<'a, M> Encodable for M where
    M: Message<'a>, 
[src]

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

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

impl<'a, M> Tagged for M where
    M: Message<'a>, 
[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.