Function buffer

Source
pub fn buffer<T, F, R, I>(i: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&mut [T]) -> R,
Expand description

Buffers an iterator to a slice on the threadlocal stack and gives temporary access to that slice. Panics when running out of memory if the iterator is unbounded.