pub fn pread<Fd: AsFd>(fd: Fd, buf: &mut [u8], offset: u64) -> Result<usize>
pread(fd, buf, offset)—Reads from a file at a given position.
pread(fd, buf, offset)
This takes a &mut [u8] which Rust requires to contain initialized memory. To use an uninitialized buffer, use pread_uninit.
&mut [u8]
pread_uninit