pub struct RChunksExact<'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 end of the slice.
chunk_size
When the slice len is not evenly divided by the chunk size, the last up to chunk_size-1 elements will be omitted but can be retrieved from the remainder function from the iterator.
chunk_size-1
remainder
This struct is created by the rchunks_exact method on slices.
rchunks_exact
let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.rchunks_exact(2); assert_eq!(iter.next(), Some(&['e', 'm'][..])); assert_eq!(iter.next(), Some(&['o', 'r'][..])); assert_eq!(iter.next(), None);
Returns the remainder of the original slice that is not going to be returned by the iterator. The returned slice has at most chunk_size-1 elements.
let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.rchunks_exact(2); assert_eq!(iter.remainder(), &['l'][..]); assert_eq!(iter.next(), Some(&['e', 'm'][..])); assert_eq!(iter.remainder(), &['l'][..]); assert_eq!(iter.next(), Some(&['o', 'r'][..])); assert_eq!(iter.remainder(), &['l'][..]); assert_eq!(iter.next(), None); assert_eq!(iter.remainder(), &['l'][..]);
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