Lyricdev
GitHub

struct PeekableIter

pub struct PeekableIter<I :: [Iterator]> :: [Iterator]

Conforms to Iterator, Closeable.

Yields the values of an iterator and lets PeekableIter.peek look at the next one without taking it; made by it.peekable().

Methods

pub mut fn peek(): ?I.Item throws I.Error

Returns the value the next next() will return, or null at the end, without taking it.

The value is pulled from the inner iterator once; further calls return it again.

pub mut fn next(): ?I.Item throws I.Error
fn close(): void throws I.Error