pub enum RowIdMask {
AllowList(RowIdSet),
BlockList(RowIdSet),
}Expand description
A mask over stable row ids based on an allow-list or block-list.
The semantics mirror RowAddrMask, but operate on stable
row ids instead of physical row addresses.
Variants§
AllowList(RowIdSet)
Only the ids in the set are selected.
BlockList(RowIdSet)
All ids are selected except those in the set.
Implementations§
Source§impl RowIdMask
impl RowIdMask
Sourcepub fn allow_nothing() -> Self
pub fn allow_nothing() -> Self
Create a mask that doesn’t allow any row id.
Sourcepub fn from_allowed(allow_list: RowIdSet) -> Self
pub fn from_allowed(allow_list: RowIdSet) -> Self
Create a mask from an allow list.
Sourcepub fn from_block(block_list: RowIdSet) -> Self
pub fn from_block(block_list: RowIdSet) -> Self
Create a mask from a block list.
Sourcepub fn selected(&self, row_id: u64) -> bool
pub fn selected(&self, row_id: u64) -> bool
True if the row id is selected by the mask, false otherwise.
Sourcepub fn selected_indices<'a>(
&self,
row_ids: impl Iterator<Item = &'a u64> + 'a,
) -> Vec<u64>
pub fn selected_indices<'a>( &self, row_ids: impl Iterator<Item = &'a u64> + 'a, ) -> Vec<u64>
Return the indices of the input row ids that are selected by the mask.
Sourcepub fn also_block(self, block_list: RowIdSet) -> Self
pub fn also_block(self, block_list: RowIdSet) -> Self
Also block the given ids.
AllowList(a)->AllowList(a \\ block_list)BlockList(b)->BlockList(b union block_list)
Sourcepub fn also_allow(self, allow_list: RowIdSet) -> Self
pub fn also_allow(self, allow_list: RowIdSet) -> Self
Also allow the given ids.
AllowList(a)->AllowList(a union allow_list)BlockList(b)->BlockList(b \\ allow_list)
Trait Implementations§
impl StructuralPartialEq for RowIdMask
Auto Trait Implementations§
impl Freeze for RowIdMask
impl RefUnwindSafe for RowIdMask
impl Send for RowIdMask
impl Sync for RowIdMask
impl Unpin for RowIdMask
impl UnsafeUnpin for RowIdMask
impl UnwindSafe for RowIdMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more