adaptors |
|
|
combinations.rs |
|
3775 |
combinations_with_replacement.rs |
|
3095 |
concat_impl.rs |
|
857 |
cons_tuples_impl.rs |
|
1947 |
diff.rs |
"Diff"ing iterators for caching elements to sequential collections without requiring the new
elements' iterator to be `Clone`.
- [`Diff`] (produced by the [`diff_with`] function)
describes the difference between two non-`Clone` iterators `I` and `J` after breaking ASAP from
a lock-step comparison. |
2617 |
duplicates_impl.rs |
|
6218 |
either_or_both.rs |
|
8324 |
exactly_one_err.rs |
|
3087 |
extrema_set.rs |
|
1462 |
flatten_ok.rs |
|
5156 |
format.rs |
|
3296 |
free.rs |
Free functions that create iterator adaptors or call iterator methods.
The benefit of free functions is that they accept any [`IntoIterator`] as
argument, so the resulting code may be easier to read. |
7135 |
group_map.rs |
|
771 |
groupbylazy.rs |
println!("client={}, bottom_group={}, oldest_buffered_group={}, top_group={}, buffers=[{}]",
client, self.bottom_group, self.oldest_buffered_group,
self.top_group,
self.buffer.iter().map(|elt| elt.len()).format(", "));
|
16724 |
grouping_map.rs |
|
20188 |
impl_macros.rs |
Implementation's internal macros |
755 |
intersperse.rs |
|
3135 |
k_smallest.rs |
|
669 |
kmerge_impl.rs |
loop body |
6583 |
lazy_buffer.rs |
|
1264 |
lib.rs |
Extra iterator adaptors, functions and macros.
To extend [`Iterator`] with methods in this crate, import
the [`Itertools`] trait:
```
use itertools::Itertools;
```
Now, new methods like [`interleave`](Itertools::interleave)
are available on all iterators:
```
use itertools::Itertools;
let it = (1..3).interleave(vec![-1, -2]);
itertools::assert_equal(it, vec![1, -1, 2, -2]);
```
Most iterator methods are also provided as functions (with the benefit
that they convert parameters using [`IntoIterator`]):
```
use itertools::interleave;
for elt in interleave(&[1, 2, 3], &[2, 3, 4]) {
/* loop body */
}
```
## Crate Features
- `use_std`
- Enabled by default.
- Disable to compile itertools using `#![no_std]`. This disables
any items that depend on collections (like `group_by`, `unique`,
`kmerge`, `join` and many more).
## Rust Version
This version of itertools requires Rust 1.32 or later. |
128863 |
merge_join.rs |
|
5825 |
minmax.rs |
|
3875 |
multipeek_impl.rs |
|
2472 |
pad_tail.rs |
|
2353 |
peek_nth.rs |
|
2670 |
peeking_take_while.rs |
|
4532 |
permutations.rs |
|
8087 |
powerset.rs |
|
2390 |
process_results_impl.rs |
|
2985 |
put_back_n_impl.rs |
|
1420 |
rciter_impl.rs |
|
2796 |
repeatn.rs |
|
1236 |
size_hint.rs |
Arithmetic on `Iterator.size_hint()` values.
|
2958 |
sources.rs |
Iterators that are sources (produce elements from parameters,
not from another iterator). |
4662 |
tee.rs |
|
2137 |
tuple_impl.rs |
Some iterator that produces tuples |
8916 |
unique_impl.rs |
|
4723 |
unziptuple.rs |
|
3542 |
with_position.rs |
|
2932 |
zip_eq_impl.rs |
loop body |
1561 |
zip_longest.rs |
|
2499 |
ziptuple.rs |
|
4256 |