Struct AllZeros
pub struct AllZeros;
Expand description
A read-only bitmap filled with only zeros
Trait Implementations§
§impl BitmapSlice for AllZeros
impl BitmapSlice for AllZeros
§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.
Auto Trait Implementations§
impl Freeze for AllZeros
impl RefUnwindSafe for AllZeros
impl Send for AllZeros
impl Sync for AllZeros
impl Unpin for AllZeros
impl UnwindSafe for AllZeros
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
§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