Struct std::iter::PeekableStable [-]  [+] [src]

pub struct Peekable<T, I> {
    // some fields omitted
}

An iterator with a peek() that returns an optional reference to the next element.

Methods

impl<T, I> Peekable<T, I>

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.

Trait Implementations

impl<T, I> Iterator for Peekable<T, I>

fn next(&mut self) -> Option<T>

fn size_hint(&self) -> (usize, Option<usize>)

fn size_hint(&self) -> (usize, Option<usize>)

type Item

Derived Implementations

impl<T, I> Copy for Peekable<T, I>