iterator-ext: An extension to Rust's Iterator
trait.
Usage
The crate provides the IteratorExt
trait extends the capability of those types
that implements Iterator
. It provides try_filter()
, try_flatten()
and more fallible adaptors that are analogous to those of Iterator
.
The example demonstrates the usage of the adaptors. It accumulates the values from 0 to 9, and keeps only even outcomes. It raises error when the accumulation exceeds 10.
use IteratorExt;
//!
let results: =
.map
.try_scan
.try_filter
.collect;
//!
assert_eq!;
License
MIT license. See LICENSE.txt file.