Crate adjacent_pair_iterator[−][src]
Expand description
adjacent-pair-iterator
A library that takes an iterator and turns it into an iterator over adjacent pairs.
Example:
use adjacent_pair_iterator::AdjacentPairIterator;
let vector = vec![1, 2, 3, 4];
let mut iterator = vector.adjacent_pairs();
assert_eq!((1, 2), iterator.next().unwrap());
assert_eq!((2, 3), iterator.next().unwrap());
assert_eq!((3, 4), iterator.next().unwrap());
assert_eq!(None, iterator.next());
Structs
An iterator over adjacent pairs of values in the underlying IteratorType
.
Traits
Extends all types implementing IntoIterator
with clonable items with the adjacent_pairs
method.