Type Alias indexical::impls::RustcRefIndexSet

source ·
pub type RustcRefIndexSet<'a, T> = IndexSet<T, BitSet<usize>, RefFamily<'a>>;
Expand description

IndexSet specialized to the rustc_index::bit_set::BitSet implementation with the RefFamily.

Aliased Type§

struct RustcRefIndexSet<'a, T> { /* private fields */ }

Implementations

source§

impl<T, S, P> IndexSet<T, S, P>

source

pub fn new(domain: &P::Pointer<IndexedDomain<T>>) -> Self

Creates an empty index set.

source§

impl<T, S, P> IndexSet<T, S, P>

source

pub fn indices(&self) -> impl Iterator<Item = T::Index> + '_

Returns an iterator over all the indices contained in self.

source

pub fn iter(&self) -> impl Iterator<Item = &T> + '_

Returns an iterator over all the objects contained in self.

source

pub fn iter_enumerated(&self) -> impl Iterator<Item = (T::Index, &T)> + '_

Returns an iterator over the pairs of indices and objects contained in self.

source

pub fn contains<M>(&self, index: impl ToIndex<T, M>) -> bool

Returns true if index is contained in self.

source

pub fn len(&self) -> usize

Returns the number of elements in self.

source

pub fn is_empty(&self) -> bool

Return true if self has no elements.

source

pub fn is_superset(&self, other: &IndexSet<T, S, P>) -> bool

Returns true if every element in other is also in self.

source

pub fn insert<M>(&mut self, elt: impl ToIndex<T, M>) -> bool

Adds the element elt to self, returning true if self changed.

source

pub fn union(&mut self, other: &IndexSet<T, S, P>)

Adds each element of other to self.

source

pub fn union_changed(&mut self, other: &IndexSet<T, S, P>) -> bool

Adds each element of other to self, returning true if self changed.

source

pub fn subtract(&mut self, other: &IndexSet<T, S, P>)

Removes every element of other from self.

source

pub fn subtract_changed(&mut self, other: &IndexSet<T, S, P>) -> bool

Removes every element of other from self, returning true if self changed.

source

pub fn intersect(&mut self, other: &IndexSet<T, S, P>)

Removes every element of self not in other.

source

pub fn intersect_changed(&mut self, other: &IndexSet<T, S, P>) -> bool

Removes every element of self not in other, returning true if self changed.

source

pub fn insert_all(&mut self)

Adds every element of the domain to self.

source

pub fn clear(&mut self)

Removes every element from self.

source

pub fn inner(&self) -> &S

Returns a reference to the inner set.

Trait Implementations

source§

impl<T, S, P> Eq for IndexSet<T, S, P>

source§

impl<T, S, P> Debug for IndexSet<T, S, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, S, P> PartialEq for IndexSet<T, S, P>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, S, P> JoinSemiLattice for IndexSet<T, S, P>

source§

fn join(&mut self, other: &Self) -> bool

Computes the least upper bound of two elements, storing the result in self and returning true if self has changed. Read more
source§

impl<T, S, P> Clone for IndexSet<T, S, P>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more