Struct core::iter::PeekableStable
[-]
[+]
[src]
pub struct Peekable<T, I> where I: Iterator<Item=T> {
// some fields omitted
}An iterator with a peek() that returns an optional reference to the next element.
Methods
impl<T, I> Peekable<T, I> where I: Iterator<Item=T>
fn peek(&mut self) -> Option<&T>
Return a reference to the next element of the iterator with out advancing it, or None if the iterator is exhausted.
fn is_empty(&mut self) -> bool
Check whether peekable iterator is empty or not.