# Module core::array

1.36.0 · source · [−]
Expand description

Utilities for the array primitive type.

See also the array primitive type.

## Structs

IntoIter
A by-value array iterator.
TryFromSliceError
The error type returned when a conversion from a slice to an array fails.

## Functions

try_from_fn Experimental
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.
from_fn
Creates an array `[T; N]` where each array element `T` is returned by the `cb` call.
from_mut
Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
from_ref
Converts a reference to `T` into a reference to an array of length 1 (without copying).