Trait bv::BitsPush[][src]

pub trait BitsPush: BitsMut {
    fn push_bit(&mut self, value: bool);
fn pop_bit(&mut self) -> Option<bool>; fn align_block(&mut self, value: bool) { ... }
fn push_block(&mut self, value: Self::Block) { ... } }

Bit vector operations that change the length.

Required methods

fn push_bit(&mut self, value: bool)[src]

Adds the given bit to the end of the bit vector.

fn pop_bit(&mut self) -> Option<bool>[src]

Removes and returns the last bit, if any.

Loading content...

Provided methods

fn align_block(&mut self, value: bool)[src]

Pushes value 0 or more times until the size of the bit vector is block-aligned.

fn push_block(&mut self, value: Self::Block)[src]

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.

Loading content...

Implementations on Foreign Types

impl BitsPush for Vec<bool>[src]

Loading content...

Implementors

impl<'a, Block: BlockType> BitsPush for BoolAdapter<Block, &'a mut Vec<bool>>[src]

impl<Block: BlockType> BitsPush for BoolAdapter<Block, Vec<bool>>[src]

impl<Block: BlockType> BitsPush for BitVec<Block>[src]

Loading content...