pub struct ReadOp<'a, H>where
H: FileHandle + 'a,{ /* private fields */ }Expand description
One consuming read operation. Construction performs no I/O or allocation.
Caller buffers are borrowed only until Vfsi::vread returns, including on errors.
Implementations§
Source§impl<'a, H> ReadOp<'a, H>where
H: FileHandle + 'a,
impl<'a, H> ReadOp<'a, H>where
H: FileHandle + 'a,
Sourcepub fn whole<P>(path: &'a P) -> ReadOp<'a, H>
pub fn whole<P>(path: &'a P) -> ReadOp<'a, H>
Collect a complete file; fail instead of truncating at the byte budget.
Sourcepub fn range(file: &'a H, offset: u64, length: usize) -> ReadOp<'a, H>
pub fn range(file: &'a H, offset: u64, length: usize) -> ReadOp<'a, H>
Allocate a positional range. Short progress and EOF are reported explicitly.
Sourcepub fn into(file: &'a H, offset: u64, buffer: &'a mut [u8]) -> ReadOp<'a, H>
pub fn into(file: &'a H, offset: u64, buffer: &'a mut [u8]) -> ReadOp<'a, H>
Fill caller storage at an absolute offset, without changing the cursor.
The request length is exactly buffer.len().
Sourcepub fn whole_file_path(&self) -> Option<&'a Path>
pub fn whole_file_path(&self) -> Option<&'a Path>
Inspect a complete-file path from an external Vfsi implementation.
Trait Implementations§
Source§impl<H> Debug for ReadOp<'_, H>where
H: FileHandle,
impl<H> Debug for ReadOp<'_, H>where
H: FileHandle,
Auto Trait Implementations§
impl<'a, H> !UnwindSafe for ReadOp<'a, H>
impl<'a, H> Freeze for ReadOp<'a, H>where
OpSource<'a, H>: Freeze,
impl<'a, H> RefUnwindSafe for ReadOp<'a, H>where
OpSource<'a, H>: RefUnwindSafe,
impl<'a, H> Send for ReadOp<'a, H>where
OpSource<'a, H>: Send,
impl<'a, H> Sync for ReadOp<'a, H>where
OpSource<'a, H>: Sync,
impl<'a, H> Unpin for ReadOp<'a, H>where
OpSource<'a, H>: Unpin,
impl<'a, H> UnsafeUnpin for ReadOp<'a, H>where
OpSource<'a, H>: UnsafeUnpin,
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