Crate peekable_next

Source
Expand description

The PeekableNext crate provides an extension for Rust iterators, introducing the PeekableNext struct and associated traits. This extension allows users to peek at the next element of an iterator without advancing it, which can be valuable in various scenarios where you need to inspect upcoming values before making further decisions.

Structs§

PeekableNext
The main component of this crate is the PeekableNext struct, which holds the state necessary for peeking at the next element of an iterator. It wraps around any iterator I that implements the Iterator trait and extends its capabilities to support peeking.

Traits§

PeekNext
The peekable_next() method is a constructor for creating a PeekableNext struct from an existing iterator. It wraps the iterator in a PeekableNext instance, allowing you to use the peeking capabilities offered by the crate.