| adaptors |
|
|
| combinations.rs |
|
9726 |
| combinations_with_replacement.rs |
|
6552 |
| concat_impl.rs |
|
830 |
| cons_tuples_impl.rs |
|
1073 |
| 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. |
3715 |
| duplicates_impl.rs |
|
6221 |
| either_or_both.rs |
|
17816 |
| exactly_one_err.rs |
|
3350 |
| extrema_set.rs |
|
1490 |
| flatten_ok.rs |
|
6156 |
| format.rs |
|
4860 |
| 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. |
7679 |
| group_map.rs |
|
758 |
| 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(", "));
|
17158 |
| grouping_map.rs |
|
22224 |
| impl_macros.rs |
Implementation's internal macros |
859 |
| intersperse.rs |
|
3729 |
| iter_index.rs |
|
2555 |
| k_smallest.rs |
|
4396 |
| kmerge_impl.rs |
loop body |
6470 |
| lazy_buffer.rs |
|
1662 |
| lib.rs |
Extra iterator adaptors, functions and macros.
To extend [`Iterator`] with methods in this crate, import
the [`Itertools`] trait:
```
# #[allow(unused_imports)]
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 */
# let _ = elt;
}
```
## Crate Features
- `use_std`
- Enabled by default.
- Disable to compile itertools using `#![no_std]`. This disables
any item that depend on allocations (see the `use_alloc` feature)
and hash maps (like `unique`, `counts`, `into_grouping_map` and more).
- `use_alloc`
- Enabled by default.
- Enables any item that depend on allocations (like `chunk_by`,
`kmerge`, `join` and many more).
## Rust Version
This version of itertools requires Rust 1.63.0 or later. |
160804 |
| merge_join.rs |
loop body |
10717 |
| minmax.rs |
|
3841 |
| multipeek_impl.rs |
|
2817 |
| next_array.rs |
|
9287 |
| pad_tail.rs |
|
2891 |
| peek_nth.rs |
|
5176 |
| peeking_take_while.rs |
|
5380 |
| permutations.rs |
|
5791 |
| powerset.rs |
|
3321 |
| process_results_impl.rs |
|
2788 |
| put_back_n_impl.rs |
|
1706 |
| rciter_impl.rs |
|
2874 |
| repeatn.rs |
|
1782 |
| size_hint.rs |
Arithmetic on `Iterator.size_hint()` values.
|
2383 |
| sources.rs |
Iterators that are sources (produce elements from parameters,
not from another iterator). |
4062 |
| take_while_inclusive.rs |
|
2298 |
| tee.rs |
|
2210 |
| tuple_impl.rs |
Some iterator that produces tuples |
10870 |
| unique_impl.rs |
|
4546 |
| unziptuple.rs |
|
3547 |
| with_position.rs |
|
3908 |
| zip_eq_impl.rs |
loop body |
1611 |
| zip_longest.rs |
|
3955 |
| ziptuple.rs |
|
4219 |