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

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

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

Methods

impl<'a, A, T: Iterator<A>> Peekable<A, T>

fn peek(&'a mut self) -> Option<&'a A>

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<A, T: Iterator<A>> Iterator<A> for Peekable<A, T>

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

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

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

Derived Implementations

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