pub(crate) struct MaskSelection {
mask: BooleanBuffer,
selectors: OnceLock<Vec<RowSelector>>,
count: OnceLock<usize>,
}Expand description
Mask-backed RowSelection storage.
selectors is only populated if callers use the borrowed
RowSelection::iter compatibility API. Internal paths that can stream or
consume the bitmap avoid this cache.
count caches the popcount; RowSelection::split_off propagates it to
both halves so repeated row_count() calls do not rescan the bitmap.
Fields§
§mask: BooleanBuffer§selectors: OnceLock<Vec<RowSelector>>§count: OnceLock<usize>Implementations§
Source§impl MaskSelection
impl MaskSelection
pub(super) fn new(mask: BooleanBuffer) -> Self
Sourcepub(super) fn with_count(mask: BooleanBuffer, count: usize) -> Self
pub(super) fn with_count(mask: BooleanBuffer, count: usize) -> Self
Create a selection whose selected-row count is already known.
pub(crate) fn mask(&self) -> &BooleanBuffer
pub(crate) fn into_mask(self) -> BooleanBuffer
Sourcepub(super) fn cached_count(&self) -> Option<usize>
pub(super) fn cached_count(&self) -> Option<usize>
The cached selected-row count, if it has been computed.
pub(super) fn selectors(&self) -> &[RowSelector]
Trait Implementations§
Source§impl Clone for MaskSelection
impl Clone for MaskSelection
Auto Trait Implementations§
impl !Freeze for MaskSelection
impl RefUnwindSafe for MaskSelection
impl Send for MaskSelection
impl Sync for MaskSelection
impl Unpin for MaskSelection
impl UnsafeUnpin for MaskSelection
impl UnwindSafe for MaskSelection
Blanket Implementations§
impl<T> Allocation for T
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