Skip to main content

CollectByKey

Trait CollectByKey 

Source
pub trait CollectByKey<Item, Key, Output> {
    // Required method
    fn collect_by_key(self, f: impl Fn(&Item) -> Key) -> Output;
}

Required Methods§

Source

fn collect_by_key(self, f: impl Fn(&Item) -> Key) -> Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: IntoIterator<Item = I>, I: Eq + Hash, K: Eq + Hash> CollectByKey<I, K, HashMap<K, HashSet<I>>> for T

Source§

impl<T: IntoIterator<Item = I>, I: Eq + Hash, K: Eq + Hash> CollectByKey<I, K, HashMap<K, IndexSet<I>>> for T

Source§

impl<T: IntoIterator<Item = I>, I: Eq + Hash, K: Eq + Hash> CollectByKey<I, K, IndexMap<K, HashSet<I>>> for T

Source§

impl<T: IntoIterator<Item = I>, I: Eq + Hash, K: Eq + Hash> CollectByKey<I, K, IndexMap<K, IndexSet<I>>> for T

Source§

impl<T: IntoIterator<Item = I>, I: From<I>, K: Eq + Hash> CollectByKey<I, K, HashMap<K, Vec<I>>> for T

Source§

impl<T: IntoIterator<Item = I>, I: From<I>, K: Eq + Hash> CollectByKey<I, K, IndexMap<K, Vec<I>>> for T