Struct MultiPeek
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct MultiPeek<I>
where
I: Iterator, { /* private fields */ }
See [multipeek()] for more information.
Implementations
impl<I> MultiPeek<I>
where
I: Iterator,
fn reset_peek(&mut self)Reset the peeking “cursor”
impl<I: Iterator> MultiPeek<I>
fn peek(&mut self) -> Option<&I::Item>Works exactly like
.next()with the only difference that it doesn't advance itself..peek()can be called multiple times, to peek further ahead. When.next()is called, reset the peeking “cursor”.
Trait Implementations
impl<I> Clone for MultiPeek<I>
where
I: Iterator + Clone,
I::Item: Clone,
fn clone(&self) -> Self
impl<I> Debug for MultiPeek<I>
where
I: Iterator + Debug,
I::Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I> ExactSizeIterator for MultiPeek<I>
where
I: ExactSizeIterator,
impl<I> Iterator for MultiPeek<I>
where
I: Iterator,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B,
impl<I> PeekingNext for MultiPeek<I>
where
I: Iterator,
fn peeking_next<F>(&mut self, accept: F) -> Option<Self::Item> where F: FnOnce(&Self::Item) -> bool,