Struct FixedBitmapU64
pub struct FixedBitmapU64<const N: usize = 1> { /* private fields */ }
Expand description
A bitmap of a fixed multiple of 64-bit blocks.
Implementations§
§impl FixedBitmapU64<1>
impl FixedBitmapU64<1>
§impl<const N: usize> FixedBitmapU64<N>
impl<const N: usize> FixedBitmapU64<N>
pub fn iter_one_indices_rev(&self) -> impl Iterator<Item = usize> + '_
pub fn iter_one_indices_rev(&self) -> impl Iterator<Item = usize> + '_
Iterates over the indices of the bits that are one, starting at the highest index.
Trait Implementations§
§impl<'arbitrary, const N: usize> Arbitrary<'arbitrary> for FixedBitmapU64<N>
impl<'arbitrary, const N: usize> Arbitrary<'arbitrary> for FixedBitmapU64<N>
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read more§impl<const N: usize> Bitmap for FixedBitmapU64<N>
impl<const N: usize> Bitmap for FixedBitmapU64<N>
§fn and_with(&mut self, other: &impl BitmapSlice) -> bool
fn and_with(&mut self, other: &impl BitmapSlice) -> bool
ANDs the slice with
other
. Returns true if anything changed.§fn clear_from(&mut self, other: &impl BitmapSlice) -> bool
fn clear_from(&mut self, other: &impl BitmapSlice) -> bool
Computes
self & !other
. Returns true if anything changed.§fn or_with(&mut self, other: &impl BitmapSlice) -> bool
fn or_with(&mut self, other: &impl BitmapSlice) -> bool
ORs the slice with
other
. Returns true if anything changed.§fn xor_with(&mut self, other: &impl BitmapSlice) -> bool
fn xor_with(&mut self, other: &impl BitmapSlice) -> bool
XORs the slice with
other
. Returns true if anything changed.§fn is_all_ones(&self) -> bool
fn is_all_ones(&self) -> bool
Returns true if the bitmap contains only ones.
§fn is_superset_of(&self, other: &Self) -> bool
fn is_superset_of(&self, other: &Self) -> bool
Returns true if the bitmap is a superset of
other
.
In other words: for every bit that is set in other
, it should also be set in self
.§fn new_all_zeros(len: usize) -> Self
fn new_all_zeros(len: usize) -> Self
Creates a new bitmap with all bits set to zero.
§fn new_all_ones(len: usize) -> Self
fn new_all_ones(len: usize) -> Self
Creates a new bitmap with all bits set to one.
§fn clear_many(&mut self, indices: impl Iterator<Item = usize>)
fn clear_many(&mut self, indices: impl Iterator<Item = usize>)
Sets all bits in
indices
to zero.§impl<const N: usize> BitmapSlice for FixedBitmapU64<N>
impl<const N: usize> BitmapSlice for FixedBitmapU64<N>
§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<const N: usize> Clone for FixedBitmapU64<N>
impl<const N: usize> Clone for FixedBitmapU64<N>
§fn clone(&self) -> FixedBitmapU64<N>
fn clone(&self) -> FixedBitmapU64<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<const N: usize> Debug for FixedBitmapU64<N>
impl<const N: usize> Debug for FixedBitmapU64<N>
§impl<const N: usize> Default for FixedBitmapU64<N>
impl<const N: usize> Default for FixedBitmapU64<N>
§impl<'de, const N: usize> Deserialize<'de> for FixedBitmapU64<N>
impl<'de, const N: usize> Deserialize<'de> for FixedBitmapU64<N>
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<const N: usize> From<&[usize]> for FixedBitmapU64<N>
impl<const N: usize> From<&[usize]> for FixedBitmapU64<N>
§impl<const N: usize> FromIterator<bool> for FixedBitmapU64<N>
impl<const N: usize> FromIterator<bool> for FixedBitmapU64<N>
§fn from_iter<T: IntoIterator<Item = bool>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = bool>>(iter: T) -> Self
Creates a value from an iterator. Read more
§impl<const N: usize> FromIterator<usize> for FixedBitmapU64<N>
impl<const N: usize> FromIterator<usize> for FixedBitmapU64<N>
§fn from_iter<T: IntoIterator<Item = usize>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = usize>>(iter: T) -> Self
Creates a value from an iterator. Read more
§impl<const N: usize> Hash for FixedBitmapU64<N>
impl<const N: usize> Hash for FixedBitmapU64<N>
§impl<const N: usize> Ord for FixedBitmapU64<N>
impl<const N: usize> Ord for FixedBitmapU64<N>
§fn cmp(&self, other: &FixedBitmapU64<N>) -> Ordering
fn cmp(&self, other: &FixedBitmapU64<N>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl<const N: usize> PartialEq for FixedBitmapU64<N>
impl<const N: usize> PartialEq for FixedBitmapU64<N>
§impl<const N: usize> PartialOrd for FixedBitmapU64<N>
impl<const N: usize> PartialOrd for FixedBitmapU64<N>
§impl<const N: usize> Serialize for FixedBitmapU64<N>
impl<const N: usize> Serialize for FixedBitmapU64<N>
§impl<const N: usize> TryFrom<&GrowingBitmap> for FixedBitmapU64<N>
impl<const N: usize> TryFrom<&GrowingBitmap> for FixedBitmapU64<N>
impl<const N: usize> Eq for FixedBitmapU64<N>
impl<const N: usize> StructuralPartialEq for FixedBitmapU64<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for FixedBitmapU64<N>
impl<const N: usize> RefUnwindSafe for FixedBitmapU64<N>
impl<const N: usize> Send for FixedBitmapU64<N>
impl<const N: usize> Sync for FixedBitmapU64<N>
impl<const N: usize> Unpin for FixedBitmapU64<N>
impl<const N: usize> UnwindSafe for FixedBitmapU64<N>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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