Trait DerAutoDerive

pub trait DerAutoDerive { }
Expand description

Trait to automatically derive FromDer

This trait is only a marker to control if a DER parser should be automatically derived. It is empty.

This trait is used in combination with others: after implementing TryFrom<Any> and CheckDerConstraints for a type, a free FromDer implementation is provided by implementing the DerAutoDerive trait. This is the most common case.

However, this is not automatic so it is also possible to manually implement FromDer if preferred. Manual implementation is generally only needed for generic containers (for ex. Vec<T>), because the default implementation adds a constraint on T to implement also TryFrom<Any> and CheckDerConstraints. This is problematic when T only provides FromDer, and can be solved by providing a manual implementation of FromDer.

Implementations on Foreign Types§

§

impl DerAutoDerive for &str

§

impl DerAutoDerive for &[u8]

§

impl DerAutoDerive for bool

§

impl DerAutoDerive for f32

§

impl DerAutoDerive for f64

§

impl DerAutoDerive for i8

§

impl DerAutoDerive for i16

§

impl DerAutoDerive for i32

§

impl DerAutoDerive for i64

§

impl DerAutoDerive for i128

§

impl DerAutoDerive for u8

§

impl DerAutoDerive for u16

§

impl DerAutoDerive for u32

§

impl DerAutoDerive for u64

§

impl DerAutoDerive for u128

§

impl DerAutoDerive for ()

Implementors§