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§
- Chunks
- Chunk iterator, return value of
.chunks()
Traits§
- Chunk
Iter - ChunkIter trait:
use
this to use thechunks
impl.