Trait GroupBy

Source
pub trait GroupBy: Iterator {
    // Required method
    fn group_by<T: Hash + Eq, U: Fn(&Self::Item) -> T>(
        self,
        get_key: U,
    ) -> HashMap<T, Vec<Self::Item>>;
}

Required Methods§

Source

fn group_by<T: Hash + Eq, U: Fn(&Self::Item) -> T>( self, get_key: U, ) -> HashMap<T, Vec<Self::Item>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: Iterator> GroupBy for I