Trait mz_ore::iter::IteratorExt

source ·
pub trait IteratorExtwhere
    Self: Iterator + Sized,{
    // Provided methods
    fn chain_one(self, item: Self::Item) -> Chain<Self, Once<Self::Item>> { ... }
    fn all_equal(self) -> bool
       where Self::Item: PartialEq { ... }
}
Expand description

Extension methods for iterators.

Provided Methods§

source

fn chain_one(self, item: Self::Item) -> Chain<Self, Once<Self::Item>>

Chains a single item onto the end of this iterator.

Equivalent to self.chain(iter::once(item)).

source

fn all_equal(self) -> boolwhere Self::Item: PartialEq,

Reports whether all the elements of the iterator are the same.

This condition is trivially true for iterators with zero or one elements.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<I> IteratorExt for Iwhere I: Iterator,