logo
pub struct EncodeRef<'a, T>(pub &'a T);
Expand description

Reference encoder: wrapper type which impls Encode for any reference to a type which impls the same.

Tuple Fields

0: &'a T

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Compute the length of this value in bytes when encoded as ASN.1 DER.

Encode this value as ASN.1 DER using the provided Encoder.

Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more

Available on crate feature alloc only.

Encode this message as ASN.1 DER, appending it to the provided byte vector. Read more

Available on crate feature alloc only.

Serialize this message as a byte vector.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.