Tracking issue for try_array_from_fn (original) (raw)

Provides the common use-case of creating custom fallible arrays in a reliable and unified way. Particularly useful for elements that don't implement Copy, Clone or Default.

Public API

// Unstable fn try_from_fn<E, F, T, const N: usize>(cb: F) -> Result<[T; N], E> where F: FnMut(usize) -> Result<T, E>;

Steps / History

Unresolved Questions