iterslide

Crates.ioiterslide
lib.rsiterslide
version1.0.1
sourcesrc
created_at2014-11-25 00:20:54.502844
updated_at2019-02-06 22:31:42.774363
descriptionA "sliding window" iterator.
homepagehttps://github.com/rozbb/rust-iterslide
repositoryhttps://github.com/rozbb/rust-iterslide
max_upload_size
id392
size7,227
Michael Rosenberg (rozbb)

documentation

README

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.

Commit count: 44

cargo fmt