pub struct Bitmap { /* private fields */ }Expand description
One bit per value, set meaning valid.
Words are u64 because that is the width the popcount and the mask tests want, and because a
1024 value vector is exactly 16 of them, which fits in a quarter of a cache line pair and is
the reason the vector size is 1024 rather than DuckDB’s 2048.
Implementations§
Source§impl Bitmap
impl Bitmap
Sourcepub fn all_invalid(len: usize) -> Self
pub fn all_invalid(len: usize) -> Self
A bitmap with room for len values, all null.
Sourcepub fn get(&self, index: usize) -> bool
pub fn get(&self, index: usize) -> bool
Whether the value at index is valid. Past the end reads as invalid.
Sourcepub fn set(&mut self, index: usize, valid: bool)
pub fn set(&mut self, index: usize, valid: bool)
Sets whether the value at index is valid, growing the bitmap if it has to.
Sourcepub fn count_valid(&self, len: usize) -> usize
pub fn count_valid(&self, len: usize) -> usize
How many of the first len values are valid.
Trait Implementations§
impl Eq for Bitmap
impl StructuralPartialEq for Bitmap
Auto Trait Implementations§
impl Freeze 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