Function read_uninit
pub fn read_uninit<Fd>(
fd: Fd,
buf: &mut [MaybeUninit<u8>],
) -> Result<(&mut [u8], &mut [MaybeUninit<u8>]), Errno> ⓘwhere
Fd: AsFd,
Available on crate feature
dep_rustix
only.Expand description
read(fd, buf)
—Reads from a stream.
This is equivalent to read
, except that it can read into uninitialized
memory. It returns the slice that was initialized by this function and the
slice that remains uninitialized.