Module array
Utilities for the array primitive type.
Modules
Structs
- Guard Panic guard for incremental initialization of arrays.
- GuardBack Panic guard for incremental initialization of arrays from the back.
- IntoIter A by-value [array] iterator.
- TryFromSliceError The error type returned when a conversion from a slice to an array fails.
Traits
Functions
-
from_fn
Creates an array where each element is produced by calling
fwith that element's index while walking forward through the array. -
from_mut
Converts a mutable reference to
Tinto a mutable reference to an array of length 1 (without copying). -
from_ref
Converts a reference to
Tinto a reference to an array of length 1 (without copying). -
iter_next_chunk
Pulls
Nitems fromiterand returns them as an array. If the iterator yields fewer thanNitems,Erris returned containing an iterator over the already yielded items. -
iter_next_chunk_back
Pulls
Nitems from the back ofiterand returns them as an array. If the iterator yields fewer thanNitems,Erris returned containing an iterator over the already yielded items. -
iter_next_chunk_back_erased
Version of
iter_next_chunk_backusing a passed-in slice in order to avoid needing to monomorphize for every array length. -
iter_next_chunk_erased
Version of
iter_next_chunkusing a passed-in slice in order to avoid needing to monomorphize for every array length. -
repeat
Creates an array of type
[T; N]by repeatedly cloning a value. -
try_from_fn
Creates an array
[T; N]where each fallible array elementTis returned by thecbcall. Unlikefrom_fn, where the element creation can't fail, this version will return an error if any element creation was unsuccessful. -
try_from_fn_erased
Version of
try_from_fnusing a passed-in slice in order to avoid needing to monomorphize for every array length. - write
- write_back