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

Reference value encoder: wrapper type which impls EncodeValue and Tagged for any reference type which impls the same.

By virtue of the blanket impl, this type also impls Encode.

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 (sans Tag+Length header) when encoded as ASN.1 DER. Read more

Encode value (sans Tag+Length header) as ASN.1 DER using the provided Writer. Read more

Get the Header used to encode this value.

Get the ASN.1 tag that this type is encoded with.

Return an Ordering between value portion of TLV-encoded self and other when serialized as ASN.1 DER. Read more

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.