Trait vec_collections::AbstractVecSet [−][src]
pub trait AbstractVecSet<T: Ord> {
fn as_slice(&self) -> &[T]ⓘ;
fn is_empty(&self) -> bool { ... }
fn contains(&self, value: &T) -> bool { ... }
fn is_disjoint(&self, that: &impl AbstractVecSet<T>) -> bool { ... }
fn is_subset(&self, that: &impl AbstractVecSet<T>) -> bool { ... }
fn is_superset(&self, that: &impl AbstractVecSet<T>) -> bool { ... }
fn union<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A>
where
T: Clone,
{ ... }
fn intersection<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A>
where
T: Clone,
{ ... }
fn symmetric_difference<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A>
where
T: Clone,
{ ... }
fn difference<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A>
where
T: Clone,
{ ... }
fn iter(&self) -> VecSetIter<Iter<'_, T>>ⓘNotable traits for VecSetIter<I>impl<I: Iterator> Iterator for VecSetIter<I> type Item = I::Item;
{ ... }
}
Expand description
An abstract vec set
this is implemented by VecSet and ArchivedVecSet, so they are interoperable.
Required methods
Provided methods
fn is_disjoint(&self, that: &impl AbstractVecSet<T>) -> bool
fn is_disjoint(&self, that: &impl AbstractVecSet<T>) -> bool
true if this set has no common elements with another set.
fn is_subset(&self, that: &impl AbstractVecSet<T>) -> bool
fn is_subset(&self, that: &impl AbstractVecSet<T>) -> bool
true if this set is a subset of another set.
A set is considered to be a subset of itself.
fn is_superset(&self, that: &impl AbstractVecSet<T>) -> bool
fn is_superset(&self, that: &impl AbstractVecSet<T>) -> bool
true if this set is a superset of another set.
A set is considered to be a superset of itself.
fn union<A: Array<Item = T>>(&self, that: &impl AbstractVecSet<T>) -> VecSet<A> where
T: Clone,
fn intersection<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A> where
T: Clone,
fn symmetric_difference<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A> where
T: Clone,
fn difference<A: Array<Item = T>>(
&self,
that: &impl AbstractVecSet<T>
) -> VecSet<A> where
T: Clone,
fn iter(&self) -> VecSetIter<Iter<'_, T>>ⓘNotable traits for VecSetIter<I>impl<I: Iterator> Iterator for VecSetIter<I> type Item = I::Item;
fn iter(&self) -> VecSetIter<Iter<'_, T>>ⓘNotable traits for VecSetIter<I>impl<I: Iterator> Iterator for VecSetIter<I> type Item = I::Item;
Notable traits for VecSetIter<I>
impl<I: Iterator> Iterator for VecSetIter<I> type Item = I::Item;
An iterator that returns references to the items of this set in sorted order