Expand description
Construct an array from an iterator and other helpers.
§Getting started
Add the arrays
crate to your Cargo manifest.
cargo add arrays
Now get the next N items from an iterator.
let arr: [_; 3] = arrays::from_iter(iter).unwrap();
Structs§
- Into
Iter - A by-value array iterator.
Functions§
- from_
iter - Consumes
N
elements from the iterator and returns them as an array. If the iterator yields fewer thanN
items,Err
is returned containing the already yielded items. - from_
iter_ ⚠unchecked - Consumes
N
elements from the iterator and returns them as an array.