pub trait Decode<'a>: Sized {
    fn decode<R>(decoder: &mut R) -> Result<Self, Error>
    where
        R: Reader<'a>
; fn from_der(bytes: &'a [u8]) -> Result<Self, Error> { ... } }
Available on crate feature pkcs8 only.
Expand description

Decoding trait.

This trait provides the core abstraction upon which all decoding operations are based.

Required Methods§

fn decode<R>(decoder: &mut R) -> Result<Self, Error>where
    R: Reader<'a>,

Attempt to decode this message using the provided decoder.

Provided Methods§

fn from_der(bytes: &'a [u8]) -> Result<Self, Error>

Parse Self from the provided DER-encoded byte slice.

Implementations on Foreign Types§

source§

impl<'a> Decode<'a> for Version

source§

fn decode<R>(decoder: &mut R) -> Result<Version, Error>where
    R: Reader<'a>,

§

impl<'a, T> Decode<'a> for Option<T>where
    T: Choice<'a>,

§

fn decode<R>(reader: &mut R) -> Result<Option<T>, Error>where
    R: Reader<'a>,

Implementors§

§

impl<'a> Decode<'a> for Tag

§

impl<'a> Decode<'a> for Document

§

impl<'a> Decode<'a> for Any

Available on crate feature alloc only.
§

impl<'a> Decode<'a> for AnyRef<'a>

§

impl<'a> Decode<'a> for Header

§

impl<'a> Decode<'a> for Length

§

impl<'a, T> Decode<'a> for ContextSpecific<T>where
    T: Decode<'a>,

§

impl<'a, T> Decode<'a> for Twhere
    T: DecodeValue<'a> + FixedTag,