Expand description
This module provides different helpers in creating constant sized arrays and converting them to different formats.
Functions in this module are not necessarily optimal in terms of allocations, as they tend to create intermediate vectors. For better performance, either optimise this code, or use (non-fixed-sized) vectors.
Functionsยง
- vec_
to_ boxed_ array - Converts a vector of elements to a boxed one. Semantically
equivalent to
vector.into_boxed_slice().try_into().unwrap()
. - vec_
to_ boxed_ array2 - Converts a two-dimensional vector to a constant sized two-dimensional array.
- vec_
to_ boxed_ array3 - Converts a three-dimensional vector to a constant sized two-dimensional array.