Struct der::SliceReader

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

Reader which consumes an input byte slice.

Implementations§

Create a new slice reader for the given byte slice.

Return an error with the given ErrorKind, annotating it with context about where the error occurred.

Return an error for an invalid value with the given tag.

Did the decoding operation fail due to an error?

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
Get the length of the input.
Peek at the next byte of input without modifying the cursor.
Peek forward in the input data, attempting to decode a Header from the data at the current position in the decoder. Read more
Get the position within the buffer.
Attempt to read data borrowed directly from the input as a slice, updating the internal cursor position. Read more
Decode a value which impls the Decode trait.
Return an error with the given ErrorKind, annotating it with context about where the error occurred. Read more
Finish decoding, returning the given value if there is no remaining data, or an error otherwise Read more
Get the number of bytes still remaining in the buffer.
Attempt to decode an ASN.1 CONTEXT-SPECIFIC field with the provided TagNumber. Read more
Have we read all of the input data?
Offset within the original input stream. Read more
Peek at the next byte in the decoder and attempt to decode it as a Tag value. Read more
Read a single byte.
Attempt to read input data, writing it into the provided buffer, and returning a slice on success. Read more
Read nested data of the given length.
Available on crate feature alloc only.
Read a byte vector of the given length.
Read an ASN.1 SEQUENCE, creating a nested Reader for the body and calling the provided closure with it. Read more
Obtain a slice of bytes contain a complete TLV production suitable for parsing later.

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.