rocket::mtls::oid::asn1_rs

Trait DerAutoDerive

Source
pub trait DerAutoDerive { }
Available on crate feature mtls only.
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§

Source§

impl DerAutoDerive for &str

Source§

impl DerAutoDerive for &[u8]

Source§

impl DerAutoDerive for bool

Source§

impl DerAutoDerive for f32

Source§

impl DerAutoDerive for f64

Source§

impl DerAutoDerive for i8

Source§

impl DerAutoDerive for i16

Source§

impl DerAutoDerive for i32

Source§

impl DerAutoDerive for i64

Source§

impl DerAutoDerive for i128

Source§

impl DerAutoDerive for u8

Source§

impl DerAutoDerive for u16

Source§

impl DerAutoDerive for u32

Source§

impl DerAutoDerive for u64

Source§

impl DerAutoDerive for u128

Source§

impl DerAutoDerive for ()

Implementors§