[][src]Trait asn1_der::traits::FromDerObject

pub trait FromDerObject where
    Self: Sized
{ fn from_der_object(
        der_object: DerObject
    ) -> Result<Self, Error<Asn1DerError>>; }

A trait to parse DerObjects into native types

Required methods

fn from_der_object(der_object: DerObject) -> Result<Self, Error<Asn1DerError>>

Converts a DerElement into Self

Returns either the successfully parsed object or on error:

  • Asn1DerError::InvalidEncoding if the encoded type does not conform to the DER-encoding rules
  • Asn1DerError::Unsupported if the encoded object is unsupported by this implementation (e.g. an integer that is too large)
  • Asn1DerError::InvalidTag if the tag annotates an incompatible type
Loading content...

Implementations on Foreign Types

impl FromDerObject for ()[src]

impl FromDerObject for bool[src]

impl FromDerObject for Vec<u8>[src]

impl FromDerObject for String[src]

impl FromDerObject for u64[src]

impl<T> FromDerObject for Vec<T> where
    T: FromDerObject
[src]

Loading content...

Implementors

impl FromDerObject for DerObject[src]

Loading content...