[−][src]Trait grouping_by::GroupingBy
Associated Types
type GItem
Required methods
fn grouping_by<K, F>(self, key: F) -> HashMap<K, Vec<Self::GItem>> where
Self: Sized,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
Self: Sized,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
Group by the key function given as parameter.
The keys are the different values that the function can return,
and the values are a Vec
with the items of the iterator which has the key as property
fn grouping_by_as_set<K, F>(self, key: F) -> HashMap<K, HashSet<Self::GItem>> where
Self: Sized,
Self::GItem: Eq + Hash,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
Self: Sized,
Self::GItem: Eq + Hash,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
Group by the key function given as parameter.
The keys are the different values that the function can return,
and the values are a HashSet
with the items of the iterator which has the key as property
Implementors
impl<T: Iterator> GroupingBy for T
[src]
type GItem = <T as Iterator>::Item
fn grouping_by<K, F>(self, key: F) -> HashMap<K, Vec<Self::GItem>> where
Self: Sized,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
[src]
Self: Sized,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
fn grouping_by_as_set<K, F>(self, key: F) -> HashMap<K, HashSet<Self::GItem>> where
Self: Sized,
Self::GItem: Eq + Hash,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,
[src]
Self: Sized,
Self::GItem: Eq + Hash,
F: Fn(&Self::GItem) -> K,
K: Eq + Hash,