1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# State of `Iterator` and `Stream` methods
> [!NOTE]
> current document hasn't been thoroughly checked yet
versions
| crate | version |
| ------------------ | -------: |
| `core` | `1.90.0` |
| `itertools` | `0.14.0` |
| `futures-lite` | `2.6.1` |
| `futures-util` | `0.3.31` |
| `tokio-stream` | `0.1.17` |
| `ruchei-itertools` | unstable |
| `async-itertools` | unstable |
methods
\`…' here means the base `trait`s (or extension `trait`s in base crate) implement those methods
| | `core` | `itertools` | `futures-util` | `tokio-stream` | `futures-lite` | `ruchei-itertools` | `async-itertools` |
| ------------------------ | :-----: | :---------: | :------------: | :------------: | :------------: | :----------------: | :---------------: |
| `advance_by` | ✓ | … | | | | ✓ | |
| `all` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `all_equal` | | ✓ | | | | ✓ | |
| `all_equal_value` | | ✓ | | | | | |
| `all_unique` | | ✓ | | | | | |
| `and_then` | | | ✓ | | | … | |
| `any` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `array_chunks` | ✓ | … | | | | | |
| `array_combinations` | | ✓ | | | | | |
| `batching` | | ✓ | | | | | |
| `buffer_local` | | | ✓ | | | … | |
| `buffer_unordered` | | | ✓ | | | … | |
| `by_ref` | ✓ | … | ✓ | | | … | |
| `cartesian_product` | | ✓ | | | | | |
| `catch_unwind` | | | ✓ | | | … | |
| `chain` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `chunk_by` | | ✓ | | | | | |
| `chunks` | | ✓ | ✓ | | | … | |
| `chunks_timeout` | | | | ✓ | | | |
| `circulat_tuple_windows` | | ✓ | | | | | |
| `cloned` | ✓ | … | | | ✓ | | … |
| `cmp` | ✓ | … | | | | ✓ | |
| `cmp_by` | ✓ | … | | | | ✓ | |
| `coalesce` | | ✓ | | | | | |
| `collect` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `collect_array` | | ✓ | | | | | |
| `collect_into` | ✓ | … | | | | | |
| `collect_tuple` | | ✓ | | | | | |
| `collect_vec` | | ✓ | | | | ✓ | |
| `combinations` | | ✓ | | | | | |
| `combinations_with_...` | | ✓ | | | | | |
| `concat` | | ✓ | ✓ | | | … | |
| `copied` | ✓ | … | | | ✓ | | … |
| `count` | ✓ | … | ✓ | | ✓ | … | … |
| `counts` | | ✓ | | | | | |
| `counts_by` | | ✓ | | | | | |
| `cycle` | ✓ | … | ✓ | | ✓ | … | … |
| `dedup` | | ✓ | | | | | |
| `dedup_by` | | ✓ | | | | | |
| `dedup_by_with_count` | | ✓ | | | | | |
| `dedup_eager` | | ✓ | | | | ✓ | |
| `dedup_with_count` | | ✓ | | | | | |
| `drain` | | | | | ✓ | | … |
| `dropping` | | ✓ | | | | | |
| `dropping_back` | | ✓ | | | | | |
| `duplicates` | | ✓ | | | | | |
| `duplicates_by` | | ✓ | | | | | |
| `enumerate` | ✓ | … | ✓ | | ✓ | … | … |
| `eq` | ✓ | … | | | | | |
| `eq_by` | ✓ | … | | | | | |
| `err_into` | | | ✓ | | | … | |
| `exactly_one` | | ✓ | | | | | |
| `filter` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `filter_map` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `filter_map_ok` | | ✓ | | | | | |
| `filter_ok` | | ✓ | | | | | |
| `find` | ✓ | … | | | ✓ | | … |
| `find_map` | ✓ | … | | | ✓ | | … |
| `find_or_first` | | ✓ | | | | | |
| `find_or_last` | | ✓ | | | | | |
| `find_position` | | ✓ | | | | | |
| `flat_map` | ✓ | … | ✓ | | ✓ | … | … |
| `flap_map_unordered` | | | ✓ | | | … | |
| `flatten` | ✓ | … | ✓ | | ✓ | … | … |
| `flatten_ok` | | ✓ | | | | | |
| `flatten_unordered` | | | ✓ | | | … | |
| `fold` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `fold_ok` | | ✓ | | | | | |
| `fold_options` | | ✓ | | | | | |
| `fold_while` | | ✓ | | | | | |
| `for_each` | ✓ | … | ✓ | | ✓ | … | … |
| `for_each_concurrent` | | | ✓ | | | … | |
| `format` | | ✓ | | | | | |
| `format_with` | | ✓ | | | | | |
| `forward` | | | ✓ | | | … | |
| `fuse` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `ge` | ✓ | … | | | | | |
| `get` | | ✓ | | | | | |
| `gt` | ✓ | … | | | | | |
| `inspect` | ✓ | … | ✓ | | ✓ | … | … |
| `inspect_err` | | | ✓ | | | … | |
| `inspect_ok` | | | ✓ | | | … | |
| `interleave` | | ✓ | | [^tm] | | ✓ | |
| `interleave_shortest` | | ✓ | | | | | |
| `intersperse` | ✓ | ✓ | | | | | |
| `intersperse_with` | ✓ | ✓ | | | | | |
| `into_async_read` | | | ✓ | | | … | |
| `into_future` | | | ✓ | | | … | |
| `into_group_map` | | ✓ | | | | | |
| `into_group_map_by` | | ✓ | | | | | |
| `into_grouping_map` | | ✓ | | | | | |
| `into_grouping_map_by` | | ✓ | | | | | |
| `is_partitioned` | ✓ | … | | | | | |
| `is_sorted` | ✓ | … | | | | | |
| `is_sorted_by` | ✓ | … | | | | | |
| `is_sorted_by_key` | ✓ | … | | | | | |
| `join` | | ✓ | | | | | |
| `k_largest` | | ✓ | | | | | |
| `k_largest_by` | | ✓ | | | | | |
| `k_largest_by_key` | | ✓ | | | | | |
| `k_largest_relaxed` | | ✓ | | | | | |
| `k_largest_relaxed_by` | | ✓ | | | | | |
| `k_largest_relaxed_...` | | ✓ | | | | | |
| `k_smallest` | | ✓ | | | | | |
| `k_smallest_by` | | ✓ | | | | | |
| `k_smallest_by_key` | | ✓ | | | | | |
| `k_smallest_relaxed` | | ✓ | | | | | |
| `k_smallest_relaxed_by` | | ✓ | | | | | |
| `k_smallest_relaxed_...` | | ✓ | | | | | |
| `kmerge` | | ✓ | | | | | |
| `kmerge_by` | | ✓ | | | | | |
| `last` | ✓ | … | | | ✓ | | … |
| `le` | ✓ | … | | | | | |
| `left_stream` | | | ✓ | | | … | |
| `lt` | ✓ | … | | | | | |
| `map` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `map_err` | | | ✓ | | | … | |
| `map_into` | | ✓ | | | | | |
| `map_ok` | | ✓ | | | | | |
| `map_while` | ✓ | … | | ✓ | ✓ | | … |
| `max` | ✓ | … | | | | | |
| `max_by` | ✓ | … | | | | | |
| `max_by_key` | ✓ | … | | | | | |
| `max_set` | | ✓ | | | | | |
| `max_set_by` | | ✓ | | | | | |
| `max_set_by_key` | | ✓ | | | | | |
| `merge` | | ✓ | | [^tm] | | | |
| `merge_by` | | ✓ | | | | | |
| `merge_join_by` | | ✓ | | | | | |
| `min` | ✓ | … | | | | | |
| `min_by` | ✓ | … | | | | | |
| `min_by_key` | ✓ | … | | | | | |
| `min_set` | | ✓ | | | | | |
| `min_set_by` | | ✓ | | | | | |
| `min_set_by_key` | | ✓ | | | | | |
| `minmax` | | ✓ | | | | | |
| `minmax_by` | | ✓ | | | | | |
| `minmax_by_key` | | ✓ | | | | | |
| `multi_cartesian_...` | | ✓ | | | | | |
| `multipeek` | | ✓ | | | | | |
| `multiunzip` | | ✓ | | | | | |
| `ne` | ✓ | … | | | | | |
| `next` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `next_array` | | ✓ | | | | | |
| `next_chunk` | ✓ | … | | | | | |
| `next_tuple` | | ✓ | | | | | |
| `nth` | ✓ | … | | | ✓ | | … |
| `or` | | | | | ✓ | | … |
| `or_else` | | | ✓ | | | … | |
| `pad_using` | | ✓ | | | | | |
| `partial_cmp` | ✓ | … | | | | ✓ | |
| `partial_cmp_by` | ✓ | … | | | | ✓ | |
| `partition` | ✓ | … | | | ✓ | | … |
| `partition_in_place` | ✓ | … | | | | | |
| `partition_map` | | ✓ | | | | | |
| `partition_result` | | ✓ | | | | | |
| `peekable` | ✓ | … | ✓ | ✓ | | … | |
| `peeking_take_while` | | ✓ | | | | | |
| `permutations` | | ✓ | | | | | |
| `position` | ✓ | ✓ | | | ✓ | | … |
| `position_max` | | ✓ | | | | | |
| `position_max_by` | | ✓ | | | | | |
| `position_max_by_key` | | ✓ | | | | | |
| `position_min` | | ✓ | | | | | |
| `position_min_by` | | ✓ | | | | | |
| `position_min_by_key` | | ✓ | | | | | |
| `position_minmax` | | ✓ | | | | | |
| `position_minmax_by` | | ✓ | | | | | |
| `position_minmax_by_key` | | ✓ | | | | | |
| `positions` | | ✓ | | | | | |
| `powerset` | | ✓ | | | | | |
| `process_results` | | ✓ | | | | | |
| `product` | ✓ | … | | | | | |
| `product1` | | ✓ | | | | | |
| `race` | | | | | ✓ | | … |
| `ready_chunks` | | | ✓ | | | … | |
| `reduce` | ✓ | … | | | | | |
| `rev` | ✓ | … | | | | | |
| `right_stream` | | | ✓ | | | … | |
| `rposition` | ✓ | … | | | | | |
| `scan` | ✓ | … | ✓ | | ✓ | … | … |
| `select_next_some` | | | ✓ | | | … | |
| `set_from` | | ✓ | | | | | |
| `size_hint` | ✓ | … | … | … | | … | |
| `skip` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `skip_while` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `sorted` | | ✓ | | | | | |
| `sorted_by` | | ✓ | | | | | |
| `sorted_by_cached_key` | | ✓ | | | | | |
| `sorted_by_key` | | ✓ | | | | | |
| `sorted_unstable` | | ✓ | | | | | |
| `sorted_unstable_by` | | ✓ | | | | | |
| `sorted_unstable_by_key` | | ✓ | | | | | |
| `split` | | | ✓ | | | … | |
| `step_by` | ✓ | … | | | ✓ | | … |
| `sum` | ✓ | … | | | | | |
| `sum1` | | ✓ | | | | | |
| `tail` | | ✓ | | | | | |
| `take` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `take_until` | | | ✓ | | | … | |
| `take_while` | ✓ | … | ✓ | ✓ | ✓ | … | … |
| `take_while_inclusive` | | ✓ | | | | | |
| `take_while_ref` | | ✓ | | | | | |
| `tee` | | ✓ | | | | | |
| `then` | | | ✓ | ✓ | ✓ | … | … |
| `throttle` | | | | ✓ | | | |
| `timeout` | | | | ✓ | | | |
| `timeout_repeating` | | | | ✓ | | | |
| `tree_reduce` | | ✓ | | | | | |
| `try_all` | | | ✓ | | | … | |
| `try_any` | | | ✓ | | | … | |
| `try_buffer_unordered` | | | ✓ | | | … | |
| `try_buffered` | | | ✓ | | | … | |
| `try_chunks` | | | ✓ | | | … | |
| `try_collect` | ✓ | ✓ | ✓ | | ✓ | … | … |
| `try_concat` | | | ✓ | | | … | |
| `try_filter` | | | ✓ | | | … | |
| `try_filter_map` | | | ✓ | | | … | |
| `try_find` | ✓ | … | | | | | |
| `try_flatten` | | | ✓ | | | … | |
| `try_flatten_unordered` | | | ✓ | | | … | |
| `try_fold` | ✓ | … | ✓ | | ✓ | … | … |
| `try_for_each` | ✓ | … | ✓ | | ✓ | … | … |
| `try_for_each_...` | | | ✓ | | | … | |
| `try_len` | | ✓ | | | | | |
| `try_next` | | | | ✓ | ✓ | | … |
| `try_ready_chunks` | | | ✓ | | | … | |
| `try_skip_while` | | | ✓ | | | … | |
| `try_take_while` | | | ✓ | | | … | |
| `try_zip_lazy` | | | | | | ✓ | |
| `tuple_combinations` | | ✓ | | | | | |
| `tuple_windows` | | ✓ | | | | | |
| `tuples` | | ✓ | | | | | |
| `unique` | | ✓ | | | | | |
| `unique_by` | | ✓ | | | | | |
| `unzip` | ✓ | … | ✓ | | ✓ | … | … |
| `update` | | ✓ | | | | | |
| `while_some` | | ✓ | | | | | |
| `with_position` | | ✓ | | | | | |
| `zip` | ✓ | … | ✓ | | ✓ | … | … |
| `zip_eq` | | ✓ | | | | | |
| `zip_lazy` | | | | | | ✓ | |
| `zip_longest` | | ✓ | | | | ✓ | ✓ |
[^tm]: `tokio` calls `interleave` \``merge`'