pub(crate) trait RevisitableGroupByForIterator {
    type Item;
    type Iter: Iterator<Item = Self::Item> + Clone;

    // Required method
    fn revisitable_group_by<K, F>(
        self,
        get_key: F
    ) -> RevisitableGroupBy<Self::Item, K, Self::Iter, F> 
       where K: PartialEq + Copy,
             F: FnMut(&Self::Item) -> K;
}
Expand description

This trait provides the revisitable_group_by method for all Iterator that also implements Clone.

Required Associated Types§

source

type Item

source

type Iter: Iterator<Item = Self::Item> + Clone

Required Methods§

source

fn revisitable_group_by<K, F>( self, get_key: F ) -> RevisitableGroupBy<Self::Item, K, Self::Iter, F>
where K: PartialEq + Copy, F: FnMut(&Self::Item) -> K,

Group adjacent items by key. get_key is a closure that computes the key.

Object Safety§

This trait is not object safe.

Implementors§