pub struct SparseBitSet { /* private fields */ }Expand description
A simple sparse bit set.
Implementations§
Source§impl SparseBitSet
impl SparseBitSet
Sourcepub fn new(capacity: usize) -> Self
pub fn new(capacity: usize) -> Self
Creates a new bit set that can hold at least capacity bits.
Sourcepub fn count_ones(&self) -> u32
pub fn count_ones(&self) -> u32
Returns the number of set bits.
Sourcepub fn union(&self, other: &SparseBitSet) -> SparseBitSet
pub fn union(&self, other: &SparseBitSet) -> SparseBitSet
Returns the union with another bit set.
Auto Trait Implementations§
impl Freeze for SparseBitSet
impl RefUnwindSafe for SparseBitSet
impl Send for SparseBitSet
impl Sync for SparseBitSet
impl Unpin for SparseBitSet
impl UnsafeUnpin for SparseBitSet
impl UnwindSafe for SparseBitSet
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