pub struct Bitmap { /* private fields */ }Implementations§
Source§impl Bitmap
impl Bitmap
Sourcepub fn new_in(arena: &mut MorselArena, len: usize, set: bool) -> Self
pub fn new_in(arena: &mut MorselArena, len: usize, set: bool) -> Self
Allocate a bitmap of len bits, all set or all clear.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, i: usize) -> bool
pub fn set(&mut self, i: usize)
pub fn clear(&mut self, i: usize)
pub fn words(&self) -> &[u64]
pub fn words_mut(&mut self) -> &mut [u64]
Sourcepub fn mask_tail(&mut self)
pub fn mask_tail(&mut self)
Zero the tail bits above len. Kernels that write whole words
call this once at the end instead of masking per word.
pub fn and_with(&mut self, other: &Bitmap)
pub fn or_with(&mut self, other: &Bitmap)
pub fn count_ones(&self) -> usize
Auto Trait Implementations§
impl Forget for Bitmap
impl Freeze for Bitmap
impl Move for Bitmap
impl RefUnwindSafe for Bitmap
impl Send for Bitmap
impl Sync for Bitmap
impl Unpin for Bitmap
impl UnsafeUnpin 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