pub trait FileReader {
// Required method
fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize>;
}
Expand description
This trait represents file that can atomically be read at specific point
For unix we implement it for File + AsRawFd
with pread()
system call.
For windows we’re implementing it for Mutex<File>
and use seek.