Trait std::container::Set
pub trait Set<T>: Container { fn contains(&self, value: &T) -> bool; fn is_disjoint(&self, other: &Self) -> bool; fn is_subset(&self, other: &Self) -> bool; fn is_superset(&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(&self, value: &T) -> bool
Return true if the set contains a value
fn is_disjoint(&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(&self, other: &Self) -> bool
Return true if the set is a subset of another
fn is_superset(&self, other: &Self) -> bool
Return true if the set is a superset of another