Trait std::collections::Set[src]
pub trait Set<T>: Collection {
fn contains<T>(&self, value: &T) -> bool;
fn is_disjoint<T>(&self, other: &Self) -> bool;
fn is_subset<T>(&self, other: &Self) -> bool;
fn is_superset<T>(&self, other: &Self) -> bool { ... }
}A set is a group of objects which are each distinct from one another. This trait represents actions which can be performed on sets to iterate over them.
Required Methods
fn contains<T>(&self, value: &T) -> bool
Return true if the set contains a value
fn is_disjoint<T>(&self, other: &Self) -> bool
Return true if the set has no elements in common with other.
This is equivalent to checking for an empty intersection.
fn is_subset<T>(&self, other: &Self) -> bool
Return true if the set is a subset of another
Provided Methods
fn is_superset<T>(&self, other: &Self) -> bool
Return true if the set is a superset of another