pub fn array_from_core<T, const N: usize>(
array: [T; N],
) -> Array<T, <[T; N] as AssocArraySize>::Size>Expand description
Convert a core array into an Array.
This is mostly equivalent to Array(array), but it also infers the size of
the Array.
ยงExample
use hybrid_array::Array;
use array_fusion::array_from_core;
let data = [0, 42, 0x0, 0x0, 0x12, 0x34];
// Notice that the size is inferred
let hybird: Array<u8, _> = array_from_core(data);
assert_eq!(hybird, Array(data));