pub unsafe fn read_to_object_as_bytes<T: FromBytes, E>(
read_fn: impl FnOnce(&mut [MaybeUninit<u8>]) -> Result<(), E>,
) -> Result<T, E>Expand description
Performs a read into an object 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.