Trait Set
Source pub trait Set {
type Item: Clone + Ord;
type Map<V>: Map<Self::Item, V>;
type Iter<'a>: 'a + Iterator<Item = Self::Item>
where Self: 'a;
// Required methods
fn len(&self) -> usize;
fn iter(&self) -> Self::Iter<'_>;
fn map<V: Clone, F>(&self, f: F) -> Self::Map<V>
where F: Fn(&Self::Item) -> V;
}
Expand description
Type of the items of the set.
Map type, binding each item of the graph to a value V.
§Example
Vec<V>.
The number of elements in the set.
Returns an iterator over the items of the set.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Map type, binding each item of the graph to a value V.
§Example
Vec<V>.
The number of elements in the set.
Returns an iterator over the items of the set.
Map type, binding each item of the graph to a value V.
§Example
Vec<V>.
The number of elements in the set.
Returns an iterator over the items of the set.
Map type, binding each item of the graph to a value V.
§Example
Vec<V>.
The number of elements in the set.
Returns an iterator over the items of the set.