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

Implementors