Struct XorWith
pub struct XorWith<'r, A, B> { /* private fields */ }
Expand description
A bitmap slice that is the result of XORing two slices.
Trait Implementations§
§impl<A: BitmapSlice, B: BitmapSlice> BitmapSlice for XorWith<'_, A, B>
impl<A: BitmapSlice, B: BitmapSlice> BitmapSlice for XorWith<'_, A, B>
§fn iter_data(&self) -> impl Iterator<Item = u64> + '_
fn iter_data(&self) -> impl Iterator<Item = u64> + '_
Iterates over the internal backing data of the bitmap.
§fn count_overlapping_with(&self, other: &impl BitmapSlice) -> usizewhere
Self: Sized,
fn count_overlapping_with(&self, other: &impl BitmapSlice) -> usizewhere
Self: Sized,
Counts the number of bits that are one in both this bitmap and
other
.§fn overlaps_with(&self, other: &impl BitmapSlice) -> boolwhere
Self: Sized,
fn overlaps_with(&self, other: &impl BitmapSlice) -> boolwhere
Self: Sized,
Returns true if the bitmap overlaps with
other
.
In other words, if there is any bit which is set in both bitmaps.§fn is_all_zeros(&self) -> bool
fn is_all_zeros(&self) -> bool
Returns true if all bits in the bitmap are set to one.
§fn is_subset_of(&self, other: &impl BitmapSlice) -> bool
fn is_subset_of(&self, other: &impl BitmapSlice) -> bool
Returns true if, for all bits set in the bitmap, it is also set in
other
.§fn flipped(&self) -> Flipped<'_, Self>where
Self: Sized,
fn flipped(&self) -> Flipped<'_, Self>where
Self: Sized,
Returns a slice to a bitmap where each bit is negated.
§fn anded_with<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> AndWith<'r, Self, B>where
Self: Sized,
fn anded_with<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> AndWith<'r, Self, B>where
Self: Sized,
Returns a slice to a bitmap where each bit is ANDed with
other
.§fn xored_with<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> XorWith<'r, Self, B>where
Self: Sized,
fn xored_with<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> XorWith<'r, Self, B>where
Self: Sized,
Returns a slice to a bitmap where each bit is XORed with
other
.§fn ored_with<'r, B: BitmapSlice>(&'r self, other: &'r B) -> OrWith<'r, Self, B>where
Self: Sized,
fn ored_with<'r, B: BitmapSlice>(&'r self, other: &'r B) -> OrWith<'r, Self, B>where
Self: Sized,
Returns a slice to a bitmap where each bit is ORed with
other
.§fn cleared_from<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> ClearFrom<'r, Self, B>where
Self: Sized,
fn cleared_from<'r, B: BitmapSlice>(
&'r self,
other: &'r B,
) -> ClearFrom<'r, Self, B>where
Self: Sized,
Returns a slice to a bitmap where each bit is set to
self & !other
.§fn iter_one_indices(&self) -> impl Iterator<Item = usize> + '_
fn iter_one_indices(&self) -> impl Iterator<Item = usize> + '_
Iterates over all indices in the bitmap that are set to one.
§fn count_ones(&self) -> usize
fn count_ones(&self) -> usize
Counts the number of bits that are one.
§fn count_zeros(&self) -> usize
fn count_zeros(&self) -> usize
Counts the number of bits that are zero.
impl<'r, A: Copy, B: Copy> Copy for XorWith<'r, A, B>
Auto Trait Implementations§
impl<'r, A, B> Freeze for XorWith<'r, A, B>
impl<'r, A, B> RefUnwindSafe for XorWith<'r, A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<'r, A, B> Send for XorWith<'r, A, B>
impl<'r, A, B> Sync for XorWith<'r, A, B>
impl<'r, A, B> Unpin for XorWith<'r, A, B>
impl<'r, A, B> UnwindSafe for XorWith<'r, A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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