Trait multipeek::IteratorExt
source · [−]pub trait IteratorExt: Iterator {
fn multipeek(self) -> MultiPeek<Self>ⓘNotable traits for MultiPeek<I>impl<I> Iterator for MultiPeek<I> where
I: Iterator, type Item = I::Item;
where
Self: Sized,
{ ... }
}
Expand description
An extension trait to add a multipeek
method to all the types that implement the
Iterator
trait.
// You can get an instance of `MultiPeek` by using `multipeek`
use multipeek::multipeek;
let mut iter = multipeek([1, 2, 3, 4].into_iter());
// By importing `IteratorExt` you can instead use `multipeek` as a method
// on the iterable. If you like method chaining, this is for you!
use multipeek::IteratorExt as _;
let mut iter = [1, 2, 3, 4].into_iter().multipeek();