Trait bv::BitsMut[][src]

pub trait BitsMut: Bits {
    fn set_bit(&mut self, position: u64, value: bool) { ... }
fn set_block(&mut self, position: usize, value: Self::Block) { ... }
fn set_bits(&mut self, start: u64, count: usize, value: Self::Block) { ... } }

Mutable bit vector operations that don’t affect the length.

Minimal complete definition is set_bit or set_block, since each is defined in terms of the other. Note that set_block in terms of set_bit is inefficient, and thus you should implement set_block directly if possible.

Provided Methods

Sets the bit at position to value.

The default implementation uses get_block and set_block.

Panics

Panics if position is out of bounds.

Sets the block at position to value.

The bits are laid out Block::nbits() per block, with the notional zeroth bit in the least significant position. If self.bit_len() is not a multiple of Block::nbits() then the last block will contain extra bits that are not part of the bit vector. Implementations of set_block should not change those trailing bits.

The default implementation sets a block by setting each of its bits in turn. Consider it a slow reference implementation, and override it.

Panics

Panics if position is out of bounds.

Sets count bits starting at bit index start, interpreted as a little-endian integer.

Panics

Panics if the bit span goes out of bounds.

Implementations on Foreign Types

impl<'a, T: BitsMut + ?Sized> BitsMut for &'a mut T
[src]

impl<Block: BlockType> BitsMut for Box<BitsMut<Block = Block>>
[src]

impl<Block: BlockType> BitsMut for [Block]
[src]

impl BitsMut for [bool]
[src]

impl BitsMut for Vec<bool>
[src]

impl<Block: BlockType> BitsMut for [Block; 0]
[src]

impl BitsMut for [bool; 0]
[src]

impl<Block: BlockType> BitsMut for [Block; 1]
[src]

impl BitsMut for [bool; 1]
[src]

impl<Block: BlockType> BitsMut for [Block; 2]
[src]

impl BitsMut for [bool; 2]
[src]

impl<Block: BlockType> BitsMut for [Block; 3]
[src]

impl BitsMut for [bool; 3]
[src]

impl<Block: BlockType> BitsMut for [Block; 4]
[src]

impl BitsMut for [bool; 4]
[src]

impl<Block: BlockType> BitsMut for [Block; 5]
[src]

impl BitsMut for [bool; 5]
[src]

impl<Block: BlockType> BitsMut for [Block; 6]
[src]

impl BitsMut for [bool; 6]
[src]

impl<Block: BlockType> BitsMut for [Block; 7]
[src]

impl BitsMut for [bool; 7]
[src]

impl<Block: BlockType> BitsMut for [Block; 8]
[src]

impl BitsMut for [bool; 8]
[src]

impl<Block: BlockType> BitsMut for [Block; 9]
[src]

impl BitsMut for [bool; 9]
[src]

impl<Block: BlockType> BitsMut for [Block; 10]
[src]

impl BitsMut for [bool; 10]
[src]

impl<Block: BlockType> BitsMut for [Block; 11]
[src]

impl BitsMut for [bool; 11]
[src]

impl<Block: BlockType> BitsMut for [Block; 12]
[src]

impl BitsMut for [bool; 12]
[src]

impl<Block: BlockType> BitsMut for [Block; 13]
[src]

impl BitsMut for [bool; 13]
[src]

impl<Block: BlockType> BitsMut for [Block; 14]
[src]

impl BitsMut for [bool; 14]
[src]

impl<Block: BlockType> BitsMut for [Block; 15]
[src]

impl BitsMut for [bool; 15]
[src]

impl<Block: BlockType> BitsMut for [Block; 16]
[src]

impl BitsMut for [bool; 16]
[src]

impl<Block: BlockType> BitsMut for [Block; 17]
[src]

impl BitsMut for [bool; 17]
[src]

impl<Block: BlockType> BitsMut for [Block; 18]
[src]

impl BitsMut for [bool; 18]
[src]

impl<Block: BlockType> BitsMut for [Block; 19]
[src]

impl BitsMut for [bool; 19]
[src]

impl<Block: BlockType> BitsMut for [Block; 20]
[src]

impl BitsMut for [bool; 20]
[src]

impl<Block: BlockType> BitsMut for [Block; 21]
[src]

impl BitsMut for [bool; 21]
[src]

impl<Block: BlockType> BitsMut for [Block; 22]
[src]

impl BitsMut for [bool; 22]
[src]

impl<Block: BlockType> BitsMut for [Block; 23]
[src]

impl BitsMut for [bool; 23]
[src]

impl<Block: BlockType> BitsMut for [Block; 24]
[src]

impl BitsMut for [bool; 24]
[src]

impl<Block: BlockType> BitsMut for [Block; 25]
[src]

impl BitsMut for [bool; 25]
[src]

impl<Block: BlockType> BitsMut for [Block; 26]
[src]

impl BitsMut for [bool; 26]
[src]

impl<Block: BlockType> BitsMut for [Block; 27]
[src]

impl BitsMut for [bool; 27]
[src]

impl<Block: BlockType> BitsMut for [Block; 28]
[src]

impl BitsMut for [bool; 28]
[src]

impl<Block: BlockType> BitsMut for [Block; 29]
[src]

impl BitsMut for [bool; 29]
[src]

impl<Block: BlockType> BitsMut for [Block; 30]
[src]

impl BitsMut for [bool; 30]
[src]

impl<Block: BlockType> BitsMut for [Block; 31]
[src]

impl BitsMut for [bool; 31]
[src]

impl BitsMut for u8
[src]

impl BitsMut for u16
[src]

impl BitsMut for u32
[src]

impl BitsMut for u64
[src]

impl BitsMut for u128
[src]

impl BitsMut for usize
[src]

Implementors