Struct rustc_data_structures::indexed_set::IdxSet
[−]
[src]
pub struct IdxSet<T: Idx> { /* fields omitted */ }
Represents a set (or packed family of sets), 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 bitslice
this type uses to represent the set of object it holds.
Methods
impl<T: Idx> IdxSet<T>[src]
pub fn to_owned(&self) -> IdxSetBuf<T>[src]
pub fn clear(&mut self)[src]
Removes all elements
pub fn remove(&mut self, elem: &T) -> bool[src]
Removes elem from the set self; returns true iff this changed self.
pub fn add(&mut self, elem: &T) -> bool[src]
Adds elem to the set self; returns true iff this changed self.
ⓘImportant traits for &'a mut Wpub fn range(&self, elems: &Range<T>) -> &Self[src]
ⓘImportant traits for &'a mut Wpub fn range_mut(&mut self, elems: &Range<T>) -> &mut Self[src]
pub fn contains(&self, elem: &T) -> bool[src]
Returns true iff set self contains elem.
pub fn words(&self) -> &[Word][src]
pub fn words_mut(&mut self) -> &mut [Word][src]
pub fn clone_from(&mut self, other: &IdxSet<T>)[src]
pub fn union(&mut self, other: &IdxSet<T>) -> bool[src]
pub fn subtract(&mut self, other: &IdxSet<T>) -> bool[src]
pub fn intersect(&mut self, other: &IdxSet<T>) -> bool[src]
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<T>[src]
pub fn each_bit<F>(&self, max_bits: usize, f: F) where
F: FnMut(T), [src]
F: FnMut(T),
Calls f on each index value held in this set, up to the
bound max_bits on the size of universe of indexes.
pub fn reset_to_empty(&mut self)[src]
Removes all elements from this set.
ⓘImportant traits for Elems<'a, T>pub fn elems(&self, universe_size: usize) -> Elems<T>[src]
Trait Implementations
impl<T: Idx> Borrow<IdxSet<T>> for IdxSetBuf<T>[src]
impl<T: Idx> BorrowMut<IdxSet<T>> for IdxSetBuf<T>[src]
fn borrow_mut(&mut self) -> &mut IdxSet<T>[src]
Mutably borrows from an owned value. Read more
impl<T: Idx> ToOwned for IdxSet<T>[src]
type Owned = IdxSetBuf<T>
fn to_owned(&self) -> Self::Owned[src]
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut Self::Owned)[src]
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more