Struct der::PemReader

source ·
pub struct PemReader<'i> { /* private fields */ }
Available on crate feature pem only.
Expand description

Reader type which decodes PEM on-the-fly.

Implementations§

Create a new PEM reader which decodes data on-the-fly.

Uses the default 64-character line wrapping.

Get the PEM label which will be used in the encapsulation boundaries for this document.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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
Attempt to read input data, writing it into the provided buffer, and returning a slice on success. Read more
Attempt to decode an ASN.1 CONTEXT-SPECIFIC field with the provided TagNumber. 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
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.
Read nested data of the given length.
Available on crate feature alloc only.
Read a byte vector of the given length.
Get the number of bytes still remaining in the buffer.
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.