Enum rustc_ap_rustc_index::bit_set::HybridBitSet [−][src]
pub enum HybridBitSet<T> { Sparse(SparseBitSet<T>), Dense(BitSet<T>), }
Expand description
A fixed-size bitset type with a hybrid representation: sparse when there
are up to a SPARSE_MAX
elements in the set, but dense when there are more
than SPARSE_MAX
.
This type is especially efficient for sets that typically have a small
number of elements, but a large domain_size
, and are cleared frequently.
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.
Variants
Sparse(SparseBitSet<T>)
Dense(BitSet<T>)
Implementations
pub fn iter(&self) -> HybridIter<'_, T>ⓘNotable traits for HybridIter<'a, T>
impl<'a, T: Idx> Iterator for HybridIter<'a, T> type Item = T;
[src]Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for HybridBitSet<T> where
T: RefUnwindSafe,
impl<T> Send for HybridBitSet<T> where
T: Send,
impl<T> Sync for HybridBitSet<T> where
T: Sync,
impl<T> Unpin for HybridBitSet<T> where
T: Unpin,
impl<T> UnwindSafe for HybridBitSet<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more