Crate collect_array[][src]

Allows for collecting an Iterator into an exactly sized array.

Example

use collect_array::CollectArrayResult;

let v = vec![0, 1, 2];
let result: CollectArrayResult<_, 3> = v.into_iter().collect();
assert_eq!(CollectArrayResult::Ok([0, 1, 2]), result);

Enums

CollectArrayResult

The result of collecting an Iterator into an exactly-sized array, or having failed to.