pub struct DecoderImpl<R, C: Config> { /* private fields */ }
Expand description

A Decoder that reads bytes from a given reader R.

This struct should rarely be used. In most cases, prefer any of the decode functions.

The ByteOrder that is chosen will impact the endianness that is used to read integers out of the reader.

use bincode::de::{DecoderImpl, Decode};
let mut decoder = DecoderImpl::new(some_reader, bincode::config::standard());
// this u32 can be any Decode
let value = u32::decode(&mut decoder).unwrap();

Implementations

Construct a new Decoder

Trait Implementations

The concrete BorrowReader type

Rerturns a mutable reference to the borrow reader

The concrete Reader type

The concrete Config type

Returns a mutable reference to the reader

Returns a reference to the config

Claim that n bytes are going to be read from the decoder. This can be used to validate Configuration::Limit<N>(). Read more

Notify the decoder that n bytes are being reclaimed. Read more

Claim that we’re going to read a container which contains len entries of T. This will correctly handle overflowing if len * size_of::<T>() > usize::max_value 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

Performs the conversion.

Performs the conversion.

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.