Extra iterator adaptors, functions and macros.
To extend [Iterator] with methods in this crate, import
the [Itertools] trait:
use Itertools;
Now, new methods like interleave
are available on all iterators:
use Itertools;
let it = .interleave;
assert_equal;
Most iterator methods are also provided as functions (with the benefit
that they convert parameters using [IntoIterator]):
use interleave;
for elt in interleave
Crate Features
use_std- Enabled by default.
- Disable to compile itertools using
#![no_std]. This disables any items that depend on collections (likegroup_by,unique,kmerge,joinand many more).
Rust Version
This version of itertools requires Rust 1.32 or later.