pub struct Chunks<'a, T>where T: 'a,{ /* private fields */ }
An iterator over a slice in (non-overlapping) chunks (chunk_size elements at a time), starting at the beginning of the slice.
chunk_size
When the slice len is not evenly divided by the chunk size, the last slice of the iteration will be the remainder.
This struct is created by the chunks method on slices.
chunks
let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.chunks(2); assert_eq!(iter.next(), Some(&['l', 'o'][..])); assert_eq!(iter.next(), Some(&['r', 'e'][..])); assert_eq!(iter.next(), Some(&['m'][..])); assert_eq!(iter.next(), None);
source
n
iter_advance_by
Iterator::try_fold()
exact_size_is_empty
true
iter_next_chunk
iter_intersperse
separator
peek
peek_mut
skip
fold
iter_map_windows
f
N
self
slice::windows()
None
Iterator
iterator_try_collect
iter_collect_into
iter_partition_in_place
false
iter_is_partitioned
iterator_try_reduce
try_find
clone
iter_array_chunks
iter_order_by
PartialOrd
TypeId
clone_to_uninit
dest
Returns the argument unchanged.
Calls U::from(self).
U::from(self)
That is, this conversion is whatever the implementation of From<T> for U chooses to do.
From<T> for U