Expand description
Utilities for the array primitive type.
Structs§
- Into
Iter - A by-value array iterator.
- TryFrom
Slice Error - The error type returned when a conversion from a slice to an array fails.
Functions§
- from_fn
- Creates an array of type [T; N], where each element
T
is the returned value fromcb
using that element’s index. - 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). - repeat
Experimental - Creates an array of type
[T; N]
by repeatedly cloning a value. - try_
from_ fn Experimental - Creates an array
[T; N]
where each fallible array elementT
is returned by thecb
call. Unlikefrom_fn
, where the element creation can’t fail, this version will return an error if any element creation was unsuccessful.