std::array - Rust (original) (raw)
Module array
1.35.0 · Source
Expand description
A by-value array iterator.
The error type returned when a conversion from a slice to an array fails.
Creates an array where each element is produced by calling f with that element’s index while walking forward through the array.
Converts a mutable reference to T into a mutable reference to an array of length 1 (without copying).
Converts a reference to T into a reference to an array of length 1 (without copying).
Creates an array of type [T; N] by repeatedly cloning a value.
try_from_fnExperimental
Creates an array [T; N] where each fallible array element T is returned by the cb call. Unlike from_fn, where the element creation can’t fail, this version will return an error if any element creation was unsuccessful.