pub struct Header {
pub tag: Tag,
pub length: Length,
}
Expand description
ASN.1 DER headers: tag + length component of TLV-encoded values
Tag representing the type of the encoded value
Length of the encoded value
Create a new Header
from a Tag
and a specified length.
Returns an error if the length exceeds the limits of Length
.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Attempt to decode this message using the provided decoder.
Parse Self
from the provided DER-encoded byte slice.
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
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
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.