fn read_array<const N: usize>(
buf: &[u8],
start: usize,
end: usize,
) -> Option<[u8; N]>Expand description
Copy exactly N bytes from buf[start..end] into a fixed-size array.
Returns None if the range is out of bounds or its length is not N.
Callers that need a hard failure (e.g. corrupt EEPROM data) should
treat None as a validation error rather than substituting a default,
because zero is a valid output for checksums and serialized values.