Enum spki::AlgorithmParameters[][src]

pub enum AlgorithmParameters<'a> {
    Any(Any<'a>),
    Null,
    Oid(ObjectIdentifier),
}

The parameters field of AlgorithmIdentifier.

This is an algorithm-defined ANY field, but we map it into an enum for now to simplify the ObjectIdentifier use case.

Ideally this type can eventually go away and be replaced by Any with the assistance of OID reference types. See the following tracking issue for more info:

https://github.com/RustCrypto/utils/issues/266

Variants

Any(Any<'a>)

Catch-all ASN.1 ANY type.

Types which don't map to the other variants of this enum will be mapped to this one instead.

Null

ASN.1 NULL value

ObjectIdentifier that names a specific algorithm within a larger algorithm family.

Implementations

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

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

Get the Any value if applicable.

Note that this will return None in the event the parameter is an OID or NULL.

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

Get the OID value if applicable

pub fn is_null(self) -> bool[src]

Is this parameter value NULL?

pub fn is_oid(self) -> bool[src]

Is this parameter value an OID?

Trait Implementations

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

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

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

impl<'a> Encodable for AlgorithmParameters<'a>[src]

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

impl<'a> From<Null> for AlgorithmParameters<'a>[src]

impl<'a> From<ObjectIdentifier> for AlgorithmParameters<'a>[src]

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

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

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

impl<'a> TryFrom<Any<'a>> for AlgorithmParameters<'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<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.