pub struct FileReader { /* private fields */ }Expand description
An open read-only file. Renaming or unlinking its path never redirects reads. Reads return what’s on disk, as the platform’s own positioned reads do.
Implementations§
Source§impl FileReader
impl FileReader
Sourcepub fn read_at(
&self,
offset: u64,
len: usize,
) -> Result<Vec<u8>, ObservationError>
pub fn read_at( &self, offset: u64, len: usize, ) -> Result<Vec<u8>, ObservationError>
Read exactly the requested bytes using the open file’s positioned-read API. A range beyond the captured size fails instead of returning a short read, and a file found shorter than that range fails as changed.
Auto Trait Implementations§
impl Freeze for FileReader
impl RefUnwindSafe for FileReader
impl Send for FileReader
impl Sync for FileReader
impl Unpin for FileReader
impl UnsafeUnpin for FileReader
impl UnwindSafe for FileReader
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