Trait eclectic::set::Set
[−]
[src]
pub trait Set: Collection { fn is_disjoint(&self, other: &Self) -> bool where Self: Sized; fn is_subset(&self, other: &Self) -> bool where Self: Sized; fn iter<'a>(&'a self) -> Box<Iterator<Item=&'a Self::Item> + 'a>; fn is_superset(&self, other: &Self) -> bool where Self: Sized { ... } }
A set.
A set is a collection whose items are distinguished according to some uniqueness criteria.
Required Methods
fn is_disjoint(&self, other: &Self) -> bool where Self: Sized
Checks if the set is disjoint from the given set.
fn is_subset(&self, other: &Self) -> bool where Self: Sized
Checks if the set is a subset of the given set.
fn iter<'a>(&'a self) -> Box<Iterator<Item=&'a Self::Item> + 'a>
Returns an iterator that yields references to the set's items.
The iteration order is unspecified, but subtraits may place a requirement on it.
Provided Methods
fn is_superset(&self, other: &Self) -> bool where Self: Sized
Checks if the set is a superset of the given set.