97c953f561
This is inherited from the old PR. This method returns an iterator over mapped windows of the starting iterator. Adding the more straight-forward `Iterator::windows` is not easily possible right now as the items are stored in the iterator type, meaning the `next` call would return references to `self`. This is not allowed by the current `Iterator` trait design. This might change once GATs have landed. The idea has been brought up by @m-ou-se here: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Iterator.3A.3A.7Bpairwise.2C.20windows.7D/near/224587771 Co-authored-by: Lukas Kalbertodt <lukas.kalbertodt@gmail.com> |
||
---|---|---|
.. | ||
array_chunks.rs | ||
by_ref_sized.rs | ||
chain.rs | ||
cloned.rs | ||
copied.rs | ||
cycle.rs | ||
enumerate.rs | ||
filter_map.rs | ||
filter.rs | ||
flat_map.rs | ||
flatten.rs | ||
fuse.rs | ||
inspect.rs | ||
intersperse.rs | ||
map_windows.rs | ||
map.rs | ||
mod.rs | ||
peekable.rs | ||
scan.rs | ||
skip_while.rs | ||
skip.rs | ||
step_by.rs | ||
take_while.rs | ||
take.rs | ||
zip.rs |