View all comments
Feature gate: #![feature(iter_next_chunk)]
This is a tracking issue for the .next_chunk() method on iterators which allows you to advance the iterator N elements and return an array [T; N]
Public API
use core::array;
trait Iterator {
type Item;
fn next_chunk<const N: usize>(&mut self) -> Result<[Self::Item; N], array::IntoIter<Self::Item, N>>
where
Self: Sized;
}
Steps / History
Unresolved Questions
- Naming: other options include
next_array() or next_array_chunk().
- Should we also add
next_chunk_back to DoubleEndedIterator?
- How should we handle
N = 0?
View all comments
Feature gate:
#![feature(iter_next_chunk)]This is a tracking issue for the
.next_chunk()method on iterators which allows you to advance the iteratorNelements and return an array[T; N]Public API
Steps / History
Iterator::next_chunk#93700slice_iter.copied().next_chunk()#103166Unresolved Questions
next_array()ornext_array_chunk().next_chunk_backtoDoubleEndedIterator?N = 0?