pub struct BufferedReader<R: Read> { /* private fields */ }
Expand description

Similar to std::io::BufRead, but more performant.

There is no simple way to wrap a standard BufRead such that it can compute checksums on consume. This is really something that needs a less restrictive interface. Apart from enabling checksum computations, this buffered reader has some convenience functions.

Implementations

Wrap the reader in a new buffered reader.

Destroys the buffered reader, returning the wrapped reader.

Anything in the buffer will be lost.

Trait Implementations

Reads a single byte, failing on EOF.

Reads a single byte, not failing on EOF.

Reads until the provided buffer is full.

Skips over the specified number of bytes. Read more

Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.

Reads two bytes and interprets them as a big-endian 16-bit unsigned integer.

Reads three bytes and interprets them as a big-endian 24-bit unsigned integer.

Reads four bytes and interprets them as a big-endian 32-bit unsigned integer.

Reads four bytes and interprets them as a little-endian 32-bit unsigned integer.

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.