Function boxed_array::from_default
source · [−]pub fn from_default<T, A, F>() -> Box<A> where
A: BuildArray<T, F>,
T: Default,
Expand description
Constructs an array of default values directly on the heap.
The size and the dimensionality of the returned array is not limited.
Due to the fact that Default is implemented for (some) arrays
where the contained type also provides Default, the compiler may
struggle to infer all the types for this function when a multi-dimensional
array is requested. If this is the case, the function can be called
as from_default::<T, _, _>()
where T
is the type that you wish to
use the Default implementation of.