RevisitableGroupByForIterator

Trait RevisitableGroupByForIterator 

Source
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.

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§