pub struct ByteWriter<W: Write, E: Endianness> { /* private fields */ }
Expand description

For writing aligned bytes to a stream of bytes in a given endianness.

This only writes aligned values and maintains no internal state.

Implementations

Wraps a ByteWriter around something that implements Write

Wraps a BitWriter around something that implements Write with the given endianness.

Unwraps internal writer and disposes of ByteWriter. Any unwritten partial bits are discarded.

Provides mutable reference to internal writer.

Converts ByteWriter to BitWriter in the same endianness.

Provides temporary BitWriter in the same endianness.

Warning

Any unwritten bits left over when BitWriter is dropped are lost.

Trait Implementations

Writes whole numeric value to stream Read more
Writes the entirety of a byte buffer to the stream. 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.