Expand description
Collection of iterator adapter creation functions that act like their so-named Iterator
method counterparts,
but they take any instance of IntoIterator
(which includes iterators and mutable references to them),
allowing you to choose whether to call IntoIterator::into_iter
or Iterator::by_ref
explicitly.
Examples
use iia::chain;
let mut range = 0..10;
let mut iter = chain([1, 2, 3], &mut range);
iter.nth(5);
assert_eq!(range, 3..10);
use iia::rev;
for (i, j) in rev([1, 2, 3]).enumerate() {
assert_eq!(i, 3 - j);
}
Functions
IntoIterator
-enabled version ofIterator::chain
.IntoIterator
-enabled version ofIterator::cloned
.IntoIterator
-enabled version ofIterator::copied
.IntoIterator
-enabled version ofIterator::cycle
.IntoIterator
-enabled version ofIterator::enumerate
.IntoIterator
-enabled version ofIterator::filter
.IntoIterator
-enabled version ofIterator::filter_map
.IntoIterator
-enabled version ofIterator::flat_map
.IntoIterator
-enabled version ofIterator::flatten
.IntoIterator
-enabled version ofIterator::fuse
.IntoIterator
-enabled version ofIterator::inspect
.IntoIterator
-enabled version ofIterator::map
.IntoIterator
-enabled version ofIterator::map_while
.IntoIterator
-enabled version ofIterator::peekable
.IntoIterator
-enabled version ofIterator::rev
.IntoIterator
-enabled version ofIterator::scan
.IntoIterator
-enabled version ofIterator::skip
.IntoIterator
-enabled version ofIterator::skip_while
.IntoIterator
-enabled version ofIterator::step_by
.IntoIterator
-enabled version ofIterator::take
.IntoIterator
-enabled version ofIterator::take_while
.IntoIterator
-enabled version ofIterator::zip
.