pub trait MassMapReader {
// Required method
fn read_exact_at<F, R>(&self, offset: u64, length: u64, f: F) -> Result<R>
where F: Fn(&[u8]) -> Result<R>;
// Provided method
fn batch_read_at<F, R>(&self, iov: &[(u64, u64)], f: F) -> Result<Vec<R>>
where F: Fn(usize, &[u8]) -> Result<R> { ... }
}Expand description
Trait abstracting read access to massmap files.
Implementations must support positional reads without mutating shared state.
The trait is blanket-implemented for platform-specific FileExt handles.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T: FileExt> MassMapReader for T
Available on Unix only.