pub fn read<Fd: AsFd>(fd: Fd, buf: &mut [u8]) -> Result<usize>
read(fd, buf)—Reads from a stream.
read(fd, buf)
This takes a &mut [u8] which Rust requires to contain initialized memory. To use an uninitialized buffer, use read_uninit.
&mut [u8]
read_uninit