Struct Flipped
pub struct Flipped<'r, A>(/* private fields */);
Expand description
A bitmap slice where all bits are flipped compared to the original slice.
Trait Implementations§
§impl<A: BitmapSlice> BitmapSlice for Flipped<'_, A>
impl<A: BitmapSlice> BitmapSlice for Flipped<'_, A>
§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> Copy for Flipped<'r, A>
Auto Trait Implementations§
impl<'r, A> Freeze for Flipped<'r, A>
impl<'r, A> RefUnwindSafe for Flipped<'r, A>where
A: RefUnwindSafe,
impl<'r, A> Send for Flipped<'r, A>where
A: Sync,
impl<'r, A> Sync for Flipped<'r, A>where
A: Sync,
impl<'r, A> Unpin for Flipped<'r, A>
impl<'r, A> UnwindSafe for Flipped<'r, A>where
A: 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