logo

Struct der::Header

source · []
pub struct Header {
    pub tag: Tag,
    pub length: Length,
}
Expand description

ASN.1 DER headers: tag + length component of TLV-encoded values

Fields

tag: Tag

Tag representing the type of the encoded value

length: Length

Length of the encoded value

Implementations

Create a new Header from a Tag and a specified length.

Returns an error if the length exceeds the limits of Length.

Trait Implementations

Returns a copy of the value. Read more

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.

Return an Ordering between self and other when serialized as ASN.1 DER. Read more

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 is supported on crate feature alloc only.

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

This is supported on crate feature alloc only.

Serialize this message as a byte vector.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.