Expand description
A sliding-window iterator library. Usable with any Iterator or IntoIterator with clonable
values.
Example:
use iterslide::SlideIterator;
let v: Vec<i8> = vec![1, 2, 3, 4, 5];
for window in v.slide(3) {
// window is a VecDeque<i8>
println!("{:?}", window);
}
/*
Output:
[1, 2, 3]
[2, 3, 4]
[3, 4, 5]
*/Structs§
- Slide
- Slide is a sliding-window iterator. The
nextmethod returns aVecDequerepresenting the current window.