Expand description
Allows zero-cost collection into exact-size arrays and tuples.
§Usage
use collect_exact::CollectExact;
let iter = [1, 2, 3].into_iter();
let result = iter.collect_exact::<[u32; 3]>();
assert_eq!(result, Ok([1, 2, 3]));Structs§
- Prefix
Error - Error that is returned when the iterator has too few items.
Enums§
- Error
- Error that is returned when the iterator does not have exactly the right number of items.
Traits§
- Collect
Exact - Extension trait for collecting into collections whose length is known at compile time.
- From
Iterator Exact - Conversion from an
Iteratorfor a collection whose length is known at compile time.