pub trait Decode<'a>: Sized {
// Required method
fn decode<R: Reader<'a>>(decoder: &mut R) -> Result<Self>;
// Provided method
fn from_der(bytes: &'a [u8]) -> Result<Self> { ... }
}
Expand description
Decoding trait.
This trait provides the core abstraction upon which all decoding operations are based.
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<'a, T> Decode<'a> for PhantomData<T>where
T: ?Sized,
impl<'a, T> Decode<'a> for PhantomData<T>where
T: ?Sized,
Dummy implementation for PhantomData
which allows deriving
implementations on structs with phantom fields.
Implementors§
impl<'a> Decode<'a> for Tag
impl<'a> Decode<'a> for Any
Available on crate feature
alloc
only.impl<'a> Decode<'a> for AnyRef<'a>
impl<'a> Decode<'a> for Document
Available on crate feature
alloc
only.