pub fn serialize_arr<S, T: Sized + Serialize, const SIZE: usize>(
    data: &[T; SIZE],
    serializer: S
) -> Result<S::Ok, S::Error>
where S: Serializer,
Expand description

Serialize data T inside arrays as a seq instead of a tuple. T must be serializable. When deserializing, an array size validation is required to transform the slice to an array.

This approach is used to go around serde’s limitation of serializable array sizes.