Struct rustc_ap_rustc_index::bit_set::BitSet [−][src]
pub struct BitSet<T> { /* fields omitted */ }
Expand description
A fixed-size bitset type with a dense representation.
NOTE: Use GrowableBitSet
if you need support for resizing after creation.
T
is an index type, typically a newtyped usize
wrapper, but it can also
just be usize
.
All operations that involve an element will panic if the element is equal to or greater than the domain size. All operations that involve two bitsets will panic if the bitsets have differing domain sizes.
Implementations
Gets the domain size.
Creates a new, empty bitset with a given domain_size
.
Creates a new, filled bitset with a given domain_size
.
Sets all bits to true.
Sets self = self | other
and returns true
if self
changed
(i.e., if new bits were added).
Sets self = self - other
and returns true
if self
changed.
(i.e., if any bits were removed).
Sets self = self & other
and return true
if self
changed.
(i.e., if any bits were removed).
Iterates over the indices of set bits in a sorted order.
Duplicates the set as a hybrid set.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for BitSet<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for BitSet<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.