pub struct Bitmap { /* private fields */ }Expand description
A packed validity mask: 1 bit per element, set = present (valid), clear =
missing (volas.NA). Bits are stored LSB-first in u64 words; bits beyond
len are kept clear so a popcount over every word counts exactly the present
values.
Implementations§
Source§impl Bitmap
impl Bitmap
Sourcepub fn from_valid_iter(
len: usize,
valid: impl IntoIterator<Item = bool>,
) -> Bitmap
pub fn from_valid_iter( len: usize, valid: impl IntoIterator<Item = bool>, ) -> Bitmap
Build from an iterator of valid flags (true = present).
Sourcepub fn get(&self, i: usize) -> bool
pub fn get(&self, i: usize) -> bool
Whether element i is present (valid). i is assumed in bounds.
Sourcepub fn set(&mut self, i: usize, valid: bool)
pub fn set(&mut self, i: usize, valid: bool)
Mark element i present (valid = true) or missing. i in bounds.
Sourcepub fn null_count(&self) -> usize
pub fn null_count(&self) -> usize
Count of missing values (clear bits among the first len).
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 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