pub trait ReaderAt {
// Required method
fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>;
// Provided method
fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()> { ... }
}Expand description
A trait for objects that can be read from at a specific offset.
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Source§impl ReaderAt for &[u8]
Implement ReaderAt for byte slices, useful for testing or in-memory data.
impl ReaderAt for &[u8]
Implement ReaderAt for byte slices, useful for testing or in-memory data.
Source§impl ReaderAt for File
Available on Unix only.Implement ReaderAt for std::fs::File on Unix-like systems.
impl ReaderAt for File
Available on Unix only.
Implement ReaderAt for std::fs::File on Unix-like systems.