pub trait BitsPush: BitsMut {
// Required methods
fn push_bit(&mut self, value: bool);
fn pop_bit(&mut self) -> Option<bool>;
// Provided methods
fn align_block(&mut self, value: bool) { ... }
fn push_block(&mut self, value: Self::Block) { ... }
}Expand description
Bit vector operations that change the length.
Required Methods§
Provided Methods§
Sourcefn align_block(&mut self, value: bool)
fn align_block(&mut self, value: bool)
Pushes value 0 or more times until the size of the bit
vector is block-aligned.
Sourcefn push_block(&mut self, value: Self::Block)
fn push_block(&mut self, value: Self::Block)
Pushes the given block onto the end of the bit vector.
If the end of the bit vector is not currently block-aligned, it pads with 0s up to the next block before pushing.
The default implementation pushes the block one bit at a time; override it with something more efficient.