7 releases (2 stable)

Uses old Rust 2015

1.0.1 Feb 6, 2019
1.0.0 Aug 17, 2017
0.0.5 May 24, 2015
0.0.4 Jan 3, 2015
0.0.2 Nov 25, 2014

#828 in Algorithms

Download history 127/week @ 2023-11-27 203/week @ 2023-12-04 140/week @ 2023-12-11 134/week @ 2023-12-18 65/week @ 2023-12-25 29/week @ 2024-01-01 62/week @ 2024-01-08 49/week @ 2024-01-15 162/week @ 2024-01-22 113/week @ 2024-01-29 80/week @ 2024-02-05 89/week @ 2024-02-12 239/week @ 2024-02-19 154/week @ 2024-02-26 189/week @ 2024-03-04 59/week @ 2024-03-11

643 downloads per month
Used in adjacent_lines

MIT/Apache

6KB
78 lines

rust-iterslide

Version Docs Build Status

This package implements a "sliding window" iterator.

Sample usage:

extern crate iterslide;

use iterslide::SlideIterator;

fn main() {
    let v: Vec<i8> = vec![1, 2, 3, 4, 5];

    for window in v.slide(3) {
      println!("{:?}", window);
    }
}

Output:

[1, 2, 3]
[2, 3, 4]
[3, 4, 5]

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

No runtime deps