Struct imhamt::bitmap::SmallBitmap
source · pub struct SmallBitmap(u32);
Expand description
This is a node size bitmap to allow to find element in the node’s array
Tuple Fields§
§0: u32
Implementations§
source§impl SmallBitmap
impl SmallBitmap
pub fn is_empty(self) -> bool
pub fn present(self) -> usize
sourcepub const fn once(b: LevelIndex) -> Self
pub const fn once(b: LevelIndex) -> Self
Create a new bitmap with 1 element set
sourcepub fn get_index_sparse(self, b: LevelIndex) -> ArrayIndex
pub fn get_index_sparse(self, b: LevelIndex) -> ArrayIndex
Get the sparse array index from a level index
sourcepub fn get_sparse_pos(self, b: LevelIndex) -> ArrayIndex
pub fn get_sparse_pos(self, b: LevelIndex) -> ArrayIndex
Get the position of a level index in the sparse array for insertion
sourcepub fn is_set(self, b: LevelIndex) -> bool
pub fn is_set(self, b: LevelIndex) -> bool
Check if the element exist
pub fn set_index(self, b: LevelIndex) -> Self
pub fn clear_index(self, b: LevelIndex) -> Self
Trait Implementations§
source§impl Clone for SmallBitmap
impl Clone for SmallBitmap
source§fn clone(&self) -> SmallBitmap
fn clone(&self) -> SmallBitmap
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SmallBitmap
impl Debug for SmallBitmap
source§impl PartialEq<SmallBitmap> for SmallBitmap
impl PartialEq<SmallBitmap> for SmallBitmap
source§fn eq(&self, other: &SmallBitmap) -> bool
fn eq(&self, other: &SmallBitmap) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SmallBitmap
impl Eq for SmallBitmap
impl StructuralEq for SmallBitmap
impl StructuralPartialEq for SmallBitmap
Auto Trait Implementations§
impl RefUnwindSafe for SmallBitmap
impl Send for SmallBitmap
impl Sync for SmallBitmap
impl Unpin for SmallBitmap
impl UnwindSafe for SmallBitmap
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