pub struct BitSet { /* private fields */ }Expand description
A compact bitset for tracking boolean flags by index.
Implementations§
Source§impl BitSet
impl BitSet
pub fn new() -> Self
pub fn with_capacity(bits: usize) -> Self
pub fn set(&mut self, index: usize)
pub fn clear_bit(&mut self, index: usize)
pub fn test(&self, index: usize) -> bool
pub fn count_ones(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn union(&self, other: &BitSet) -> BitSet
pub fn intersection(&self, other: &BitSet) -> BitSet
pub fn capacity_bits(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BitSet
impl RefUnwindSafe for BitSet
impl Send for BitSet
impl Sync for BitSet
impl Unpin for BitSet
impl UnsafeUnpin for BitSet
impl UnwindSafe for BitSet
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