pub struct Bitmap { /* private fields */ }Implementations§
Source§impl Bitmap
impl Bitmap
pub fn new(bit_count: usize) -> Self
pub fn count_zeros(&self, lower_bound: usize, upper_bound: usize) -> usize
pub fn count_ones(&self, lower_bound: usize, upper_bound: usize) -> usize
pub unsafe fn count_zeros_unchecked( &self, lower_bound: usize, upper_bound: usize, ) -> usize
pub unsafe fn count_ones_unchecked( &self, lower_bound: usize, upper_bound: usize, ) -> usize
pub fn first_one_bounds( &self, lower_bound: usize, upper_bound: usize, ) -> Option<usize>
pub fn first_zero_bounds( &self, lower_bound: usize, upper_bound: usize, ) -> Option<usize>
pub fn first_zero(&self, bit_index: usize) -> Option<usize>
pub fn first_one(&self, bit_index: usize) -> Option<usize>
Sourcepub unsafe fn first_zero_unchecked(&self, bit_index: usize) -> usize
pub unsafe fn first_zero_unchecked(&self, bit_index: usize) -> usize
Returns higher > bit_capacity in case of not found
Sourcepub unsafe fn first_one_unchecked(&self, bit_index: usize) -> usize
pub unsafe fn first_one_unchecked(&self, bit_index: usize) -> usize
Returns higher > bit_capacity in case of not found
pub fn check_batch(&self, handles: &[Handle]) -> bool
pub fn to_indices_true(&self) -> Vec<usize>
pub fn to_indices_true_bounded(&self, start: usize, end: usize) -> Vec<usize>
pub fn to_indices_false(&self) -> Vec<usize>
pub fn to_indices_false_bounded(&self, start: usize, end: usize) -> Vec<usize>
pub fn bit_capacity(&self) -> usize
pub fn capacity(&self) -> usize
pub fn set(&mut self, bit_index: usize, value: bool)
pub fn get(&self, bit_index: usize) -> Option<bool>
pub unsafe fn set_unchecked(&mut self, bit_index: usize, value: bool)
pub unsafe fn get_unchecked(&self, bit_index: usize) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bitmap
impl RefUnwindSafe for Bitmap
impl !Send for Bitmap
impl !Sync for Bitmap
impl Unpin for Bitmap
impl UnwindSafe for Bitmap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more