Function unpack_array

Source
pub fn unpack_array<In, T>(
    input: &mut In,
    array: &mut [T],
    arraysz: usize,
    defl: Option<&T>,
) -> Result<usize>
where In: Read, T: Unpack<In> + Clone,
Expand description

Unpack a fixed-sized array

Unpack a fixed-size array of elements. The results are placed in array, but the actual wire-size of the array is arraysz. If the supplied array is too large, the remainer is filled in with the default value (if provided); if it is too small, the excess elements are discarded.

If the provided array is too large and there is no default, then decoding fails with an InvalidLen error. All the elements in array will be initialized after a successful return.