simple_asn1

Trait FromASN1

Source
pub trait FromASN1: Sized {
    type Error: From<ASN1DecodeErr>;

    // Required method
    fn from_asn1(v: &[ASN1Block]) -> Result<(Self, &[ASN1Block]), Self::Error>;
}
Expand description

A trait defining types that can be decoded from an ASN1Block stream. Any member of this trait is also automatically a member of FromASN1WithBody, as it can obviously just ignore the body.

Required Associated Types§

Required Methods§

Source

fn from_asn1(v: &[ASN1Block]) -> Result<(Self, &[ASN1Block]), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§