pub struct BufReader<'a, B: Buf> { /* private fields */ }
Expand description

Protocol version-aware wrapper around a Buf impl

Implementations

Construct a new BufReader

The total bytes read

Convenience function to read from the buffer and deserialize

Trait Implementations

The mode this reader is reading from

Read a u8 from the underlying Read

Read a u16 from the underlying Read

Read a u32 from the underlying Read

Read a u64 from the underlying Read

Read a i32 from the underlying Read

Read a i64 from the underlying Read

Read a u64 len prefix followed by that number of exact bytes.

Read a fixed number of bytes from the underlying reader.

Consumes a byte from the reader, producing an error if it doesn’t have the expected value Read more

Access to underlying protocol version to support version specific deserialization logic. Read more

Read a fixed number of “empty” bytes from the underlying reader. It is an error if any non-empty bytes encountered. 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.

Should always be Self

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.