Struct flexiber::Decoder

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

BER-TLV decoder.

Implementations§

Create a new decoder for the given byte slice.

Decode a value which impls the Decodable trait.

Decode a TaggedValue with tag checked to be as expected, returning the value

Decode a TaggedSlice with tag checked to be as expected, returning the value

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 decoding, returning the given value if there is no remaining data, or an error otherwise

Have we decoded all of the bytes in this Decoder?

Returns false if we’re not finished decoding or if a fatal error has occurred.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

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.