pub unsafe fn read_to_array<T: FromBytes, E, const N: usize>(
read_fn: impl FnOnce(&mut [MaybeUninit<T>]) -> Result<(), E>,
) -> Result<[T; N], E>Expand description
Performs a read into an array using the provided read function.
The read function returns Ok(()) if the buffer was fully read to.
ยงSafety
The read function must only return Ok(()) if all the bytes were read to.