Struct rustc_data_structures::indexed_set::IdxSet[][src]

pub struct IdxSet<T: Idx> { /* fields omitted */ }

Represents a set of some element type E, where each E is identified by some unique index type T.

In other words, T is the type used to index into the bitvector this type uses to represent the set of object it holds.

The representation is dense, using one bit per possible element.

Methods

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

Creates set holding every element whose index falls in range 0..universe_size.

Creates set holding no elements.

Duplicates as a hybrid set.

Removes all elements

Sets all elements up to universe_size

Removes elem from the set self; returns true iff this changed self.

Adds elem to the set self; returns true iff this changed self.

Returns true iff set self contains elem.

Important traits for &'a [u8]

Important traits for &'a [u8]

Efficiently overwrite self with other. Panics if self and other don't have the same length.

Set self = self | other and return true if self changed (i.e., if new bits were added).

Like union(), but takes a HybridIdxSet argument.

Set self = self - other and return true if self changed. (i.e., if any bits were removed).

Like subtract(), but takes a HybridIdxSet argument.

Set self = self & other and return true if self changed. (i.e., if any bits were removed).

Important traits for Iter<'a, T>

Trait Implementations

impl<T: Eq + Idx> Eq for IdxSet<T>
[src]

impl<T: PartialEq + Idx> PartialEq for IdxSet<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Idx> Clone for IdxSet<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Idx> Encodable for IdxSet<T>
[src]

impl<T: Idx> Decodable for IdxSet<T>
[src]

impl<T: Idx> Debug for IdxSet<T>
[src]

Formats the value using the given formatter. Read more

impl<I: Idx, CTX> HashStable<CTX> for IdxSet<I>
[src]

Auto Trait Implementations

impl<T> Send for IdxSet<T>

impl<T> Sync for IdxSet<T>