pub trait BlockReader {
// Required method
fn read_block(&mut self, offset: u64, len: usize) -> FormatResult<Vec<u8>>;
}Expand description
Fetches arbitrary file regions for the structure walkers that cannot hold a file handle themselves (fractal heap, v2 B-tree, dense attribute storage).
Required Methods§
Sourcefn read_block(&mut self, offset: u64, len: usize) -> FormatResult<Vec<u8>>
fn read_block(&mut self, offset: u64, len: usize) -> FormatResult<Vec<u8>>
Read up to len bytes starting at offset. Returning fewer bytes is
only permitted at end of file; every caller re-checks the length it
actually needs, so a short read surfaces as BufferTooShort rather
than a misparse.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".