Struct bitstream_io::BitQueue [−][src]
pub struct BitQueue<E: Endianness, N: Numeric> { /* fields omitted */ }
Expand description
A queue for efficiently pushing bits onto a value and popping them off a value.
Implementations
Creates a new queue from the given value with the given size Panics if the value is larger than the given number of bits.
Sets the queue to a given value with the given number of bits Panics if the value is larger than the given number of bits
Returns the remaining bits the queue can hold
Pushes a value with the given number of bits onto the tail of the queue Panics if the number of bits pushed is larger than the queue can hold.
Pops a value with the given number of bits from the head of the queue Panics if the number of bits popped is larger than the number of bits in the queue.
Pops all the current bits from the queue and resets it to an empty state.
Drops the given number of bits from the head of the queue without returning them. Panics if the number of bits dropped is larger than the number of bits in the queue.
Pops all 0 bits up to and including the next 1 bit and returns the amount of 0 bits popped
Trait Implementations
Auto Trait Implementations
impl<E, N> RefUnwindSafe for BitQueue<E, N> where
E: RefUnwindSafe,
N: RefUnwindSafe,
impl<E, N> UnwindSafe for BitQueue<E, N> where
E: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more