Struct bit_manager::BitBuffer [] [src]

pub struct BitBuffer { /* fields omitted */ }

A buffer that stores up to 64 bits and remembers how many are being stored

Methods

impl BitBuffer
[src]

[src]

Creates an empty buffer.

[src]

Pushes all current bits left and adds a byte to the right.

[src]

Pushes all current bits right and pops a byte from the right.

[src]

Adds a byte to the left.

[src]

Pops a byte from the left.

[src]

Pushes all current bits left and adds a bit to the right.

[src]

Pushes all current bits right and pops a bit from the right.

[src]

Adds a bit to the left.

[src]

Pops a bit from the left.

[src]

Returns the number of bits in the buffer.

[src]

Returns the number of whole bytes in the buffer.

[src]

Returns true if the buffer is empty and false otherwise.

[src]

Returns true if the buffer has a whole byte and false otherwise.

[src]

Returns true if the buffer has a bit and false otherwise.

[src]

Returns true if the buffer has room for a whole byte and false otherwise.

[src]

Returns true if the buffer has room for a bit and false otherwise.

[src]

Returns the number of whole bytes that can be added.

[src]

Returns the number of whole bits that can be added.

Trait Implementations

impl Debug for BitBuffer
[src]

[src]

Formats the value using the given formatter.

impl Clone for BitBuffer
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for BitBuffer
[src]

[src]

Formats the value using the given formatter. Read more