Trait hi_sparse_bitset::BitBlock
source · pub trait BitBlock: BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Eq + PartialEq + Sized + Copy + Clone {
type BitsIter: BitQueue;
const SIZE_POT_EXPONENT: usize;
// Required methods
fn zero() -> Self;
fn into_bits_iter(self) -> Self::BitsIter;
fn as_array(&self) -> &[u64];
fn as_array_mut(&mut self) -> &mut [u64];
// Provided methods
fn size() -> usize { ... }
fn is_zero(&self) -> bool { ... }
fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool { ... }
fn get_bit(&self, bit_index: usize) -> bool { ... }
fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
where F: FnMut(usize) -> ControlFlow<()> { ... }
fn count_ones(&self) -> usize { ... }
}
Required Associated Types§
Required Associated Constants§
sourceconst SIZE_POT_EXPONENT: usize
const SIZE_POT_EXPONENT: usize
2^N bits
Required Methods§
fn zero() -> Self
fn into_bits_iter(self) -> Self::BitsIter
fn as_array(&self) -> &[u64]
fn as_array_mut(&mut self) -> &mut [u64]
Provided Methods§
fn is_zero(&self) -> bool
sourcefn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool
fn set_bit<const BIT: bool>(&mut self, bit_index: usize) -> bool
Returns previous bit
bit_index
is guaranteed to be valid
sourcefn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
fn traverse_bits<F>(&self, f: F) -> ControlFlow<()>
fn count_ones(&self) -> usize
Object Safety§
This trait is not object safe.