Struct bit_matrix::row::BitSlice
source · pub struct BitSlice { /* private fields */ }
Expand description
A slice of bit vector’s blocks.
Implementations§
source§impl BitSlice
impl BitSlice
sourcepub fn new_mut(slice: &mut [Block]) -> &mut Self
pub fn new_mut(slice: &mut [Block]) -> &mut Self
Creates a new slice from a mutable slice of blocks.
sourcepub fn iter_blocks(&self) -> impl Iterator<Item = &Block>
pub fn iter_blocks(&self) -> impl Iterator<Item = &Block>
Iterates over the slice’s blocks.
sourcepub fn iter_blocks_mut(&mut self) -> impl Iterator<Item = &mut Block>
pub fn iter_blocks_mut(&mut self) -> impl Iterator<Item = &mut Block>
Iterates over the slice’s blocks, yielding mutable references.
sourcepub fn get(&self, bit: usize) -> bool
pub fn get(&self, bit: usize) -> bool
Returns true
if a bit is enabled in the bit vector slice, or false
otherwise.
sourcepub fn small_slice_aligned(&self, bit: usize, len: u8) -> u32
pub fn small_slice_aligned(&self, bit: usize, len: u8) -> u32
Returns a small integer-sized slice of the bit vector slice.