Crate fastpeek

Source

Structs§

CloningPeekableIter
Provide Peek, PeekBack and PeekIter by cloning an iterator and calling next() to peek a value. This is useful for cheaply cloneable iterators, such as iterators that are backed by slices.
FnPeekableIter
Provide Peek via a function. Additionally, PeekBack and PeekIter may be implemented by chaining FnPeekableIter::new, FnPeekableIter::with_peek_back and/or FnPeekableIter::with_peek_iter
PrefetchPeekableIter
Provide Peek by using a similar strategy as [std::iter::Peekable]. Since self is not mutable in Peek::peek, this implementation eagerly fetches the value of next(). While this adapter defeats the main purpose of this crate, it may be useful in edge cases where you want to compose on Peek but have no other way of providing it.

Traits§

Peek
A trait for peeking the next value of an iterator.
PeekAdapters
Convenience trait for creating a Peek adapter. It is implemented for all iterators.
PeekBack
A trait for peeking the last value of an iterator.
PeekIter
A trait for peeking all values of an iterator.