Type Alias itertools::adaptors::coalesce::DedupWithCount

source ·
pub type DedupWithCount<I> = DedupByWithCount<I, DedupEq>;
Expand description

An iterator adaptor that removes repeated duplicates, while keeping a count of how many repeated elements were present.

See .dedup_with_count() for more information.

Aliased Type§

struct DedupWithCount<I> {
    iter: I,
    last: Option<Option<<WithCount as CountItem<<I as Iterator>::Item>>::CItem>>,
    f: DedupPredWithCount2CoalescePred<DedupEq>,
}

Fields§

§iter: I§last: Option<Option<<WithCount as CountItem<<I as Iterator>::Item>>::CItem>>

last is None while no item have been taken out of iter (at definition). Then last will be Some(Some(item)) until iter is exhausted, in which case last will be Some(None).

§f: DedupPredWithCount2CoalescePred<DedupEq>