pub struct ByteReader<R: Read, E: Endianness> { /* private fields */ }
Expand description

For reading aligned bytes from a stream of bytes in a given endianness.

This only reads aligned values and maintains no internal state.

Implementations

Wraps a ByteReader around something that implements Read

Wraps a ByteReader around something that implements Read with the given endianness.

Unwraps internal reader and disposes of ByteReader.

Provides mutable reference to internal reader

Converts ByteReader to BitReader in the same endianness.

Provides temporary BitReader in the same endianness.

Warning

Any unread bits left over when BitReader is dropped are lost.

Trait Implementations

Reads whole numeric value from stream Read more
Completely fills the given buffer with whole bytes. Read more
Skips the given number of bytes in the stream. Read more
Completely fills a whole buffer with bytes and returns it. Read more
Completely fills a vector of bytes and returns it. 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.