PeekableExt

Trait PeekableExt 

Source
pub trait PeekableExt: Iterator {
    // Required method
    fn peek(&mut self) -> Option<&Self::Item>;
}
Expand description

A trait for iterators that support peeking at the next item without consuming it.

Required Methods§

Source

fn peek(&mut self) -> Option<&Self::Item>

Peek at the next item without consuming it.

Implementations on Foreign Types§

Source§

impl<I> PeekableExt for Peekable<I>
where I: Iterator,

Source§

fn peek(&mut self) -> Option<&Self::Item>

Implementors§