Struct asn1_der::typed::Sequence

source ·
pub struct Sequence<'a> { /* private fields */ }
Expand description

An ASN.1-DER sequence view

Implementations§

Writes a new sequence object with objs as subobjects into sink and returns a type view over it

The amount of subelements in the sequence

Note: since there is no underlying index, the amount of subelements has to be recomputed every time. If you need the length more than once, consider caching it.

Gets the nth subobject

Note: since there is no underlying index, the position of each subelement has to be recomputed every time. If you need the subobjects more than once, consider caching them.

Gets the nth subobject as T

Note: since there is no underlying index, the position of each subelement has to be recomputed every time. If you need the subobjects more than once, consider caching them.

Writes a sequence consisting of objs as DER-object to sink

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Loads the Sequence and performs a shallow validation that each underlying object is a valid DER object

Note: This function does not look “into” the underlying elements nor does it perform any type-specific validation – only the tag-length constructions are validated.

Decodes an object as Self
Decodes an object as Self
Reads an object from source by parsing the length field and copying the necessary bytes into sink and decoding it from sink Read more

Encodes self to sink

Creates an DER object from an encodable type
The tag for this type
Provides raw access to the underlying DerObject

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.