Struct Unique
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Unique<I, S = RandomState>
where
I: Iterator,
I::Item: Eq + Hash + Clone,
S: BuildHasher, { /* private fields */ }
An iterator adapter to filter out duplicate elements.
See .unique() for more information.
Trait Implementations
impl<I, S> Clone for Unique<I, S>
where
I: Iterator + Clone,
I::Item: Eq + Hash + Clone + Clone,
S: BuildHasher + Clone,
fn clone(&self) -> Self
impl<I, S> Debug for Unique<I, S>
where
I: Iterator + Debug,
I::Item: Hash + Eq + Debug + Clone,
S: BuildHasher,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I, S> DoubleEndedIterator for Unique<I, S>
where
I: DoubleEndedIterator,
I::Item: Eq + Hash + Clone,
S: BuildHasher,
fn next_back(&mut self) -> Option<Self::Item>
impl<I, S> FusedIterator for Unique<I, S>
where
I: FusedIterator,
I::Item: Eq + Hash + Clone,
S: BuildHasher,
impl<I, S> Iterator for Unique<I, S>
where
I: Iterator,
I::Item: Eq + Hash + Clone,
S: BuildHasher,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn count(self) -> usize