pub struct FileRangeReader { /* private fields */ }Expand description
Local file reader implementation.
Not available on wasm32-unknown-unknown; implement ByteRangeReader over
a Cursor<Vec<u8>> or a JS Blob-backed reader instead.
Implementations§
Trait Implementations§
Source§impl ByteRangeReader for FileRangeReader
Available on non-WebAssembly only.
impl ByteRangeReader for FileRangeReader
Available on non-WebAssembly only.
type Error = MdfError
Source§fn read_range(
&mut self,
offset: u64,
length: u64,
) -> Result<Vec<u8>, Self::Error>
fn read_range( &mut self, offset: u64, length: u64, ) -> Result<Vec<u8>, Self::Error>
Read bytes from the specified range
Returns the requested bytes or an error
Source§fn read_range_optional(
&mut self,
offset: u64,
length: u64,
) -> Result<Option<Vec<u8>>, Self::Error>
fn read_range_optional( &mut self, offset: u64, length: u64, ) -> Result<Option<Vec<u8>>, Self::Error>
Read an optional metadata range that the walk can proceed without. Read more
Source§fn is_probing(&self) -> bool
fn is_probing(&self) -> bool
True when this reader is a gap-discovery probe: it cannot serve every
range and records the misses instead of returning data. Metadata walks
may then skip an unreadable subtree and keep discovering gaps elsewhere
rather than aborting on the first miss. Read more
Auto Trait Implementations§
impl Forget for FileRangeReader
impl Freeze for FileRangeReader
impl Move for FileRangeReader
impl RefUnwindSafe for FileRangeReader
impl Send for FileRangeReader
impl Sync for FileRangeReader
impl Unpin for FileRangeReader
impl UnsafeUnpin for FileRangeReader
impl UnwindSafe for FileRangeReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more