Struct flexiber::Encoder

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

BER-TLV encoder.

Implementations§

Create a new encoder with the given byte slice as a backing buffer.

Encode a value which impls the Encodable trait.

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

Did the decoding operation fail due to an error?

Finish encoding to the buffer, returning a slice containing the data written to the buffer.

Encode a collection of values which impl the Encodable trait under a given tag.

Encode a collection of values which impl the Encodable trait under a given tag.

Trait Implementations§

Formats the value using the given formatter. Read more

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 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.