Crate chunk_iter
source · [−]Expand description
Import the trait and use it:
use chunk_iter::ChunkIter;
let iter = vec![0, 1, 2, 3, 4, 5, 6].into_iter();
let mut chunks = iter.chunks::<3>();
assert_eq!(chunks.next(), Some([0, 1, 2]));
assert_eq!(chunks.next(), Some([3, 4, 5]));
assert_eq!(chunks.next(), None);
Structs
Chunk iterator, return value of .chunks()
Traits
ChunkIter trait: use
this to use the chunks
impl.