👎Deprecated
Expand description
This crate provides an iterator adapter that yields N elements of the iterator at a time.
§Deprecated
This crate is deprecated in favour of the itermore crate and it
currently just re-exports types from there. The following dependency
definition is the equivalent of using this crate.
# Cargo.toml
[dependencies]
itermore = { version = "...", default-features = false, features = ["array_chunks"] }§Getting started
Add the crate to your Cargo manifest.
cargo add iterchunksAnd bring the IterArrayChunks trait into scope.
use iterchunks::IterArrayChunks;Now you can use the array_chunks method on any iterator.
for [a, b, c] in iter.array_chunks() {
println!("{} {} {}", a, b, c)
}Generally the size of N can be inferred by the compiler but you can also
specify it manually.
let c = iter.array_chunks::<3>();Structs§
- Array
Chunks - An iterator over
Nelements of the iterator at a time.
Traits§
- Iter
Array Chunks - An extension trait that provides the
next_chunkandarray_chunksmethods for iterators.