Enum rustc_data_structures::indexed_set::HybridIdxSet[][src]

pub enum HybridIdxSet<T: Idx> {
    Sparse(SparseIdxSet<T>, usize),
    Dense(IdxSet<T>, usize),
}

Like IdxSet, but with a hybrid representation: sparse when there are few elements in the set, but dense when there are many. It's especially efficient for sets that typically have a small number of elements, but a large universe_size, and are cleared frequently.

Variants

Methods

impl<T: Idx> HybridIdxSet<T>
[src]

Returns true iff set self contains elem.

Adds elem to the set self.

Removes elem from the set self.

Converts to a dense set, consuming itself in the process.

Important traits for HybridIter<'a, T>

Iteration order is unspecified.

Trait Implementations

impl<T: Clone + Idx> Clone for HybridIdxSet<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug + Idx> Debug for HybridIdxSet<T>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for HybridIdxSet<T> where
    T: Send

impl<T> Sync for HybridIdxSet<T> where
    T: Sync