pub trait AbstractVecSet<T: Ord> {
// Required method
fn as_slice(&self) -> &[T];
// Provided methods
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>> ⓘ { ... }
}Expand description
An abstract vec set
this is implemented by VecSet and ArchivedVecSet, so they are interoperable.
Required Methods§
Provided Methods§
fn is_empty(&self) -> bool
fn contains(&self, value: &T) -> bool
Sourcefn 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.
Sourcefn 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.
Sourcefn 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,
Sourcefn iter(&self) -> VecSetIter<Iter<'_, T>> ⓘ
fn iter(&self) -> VecSetIter<Iter<'_, T>> ⓘ
An iterator that returns references to the items of this set in sorted order
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.