pub struct ReadResult {
pub file: FileOperand,
pub offset: u64,
pub data: Vec<u8>,
pub eof: bool,
}Expand description
The result of one ReadOp: the data and whether end-of-file was hit.
file echoes the request’s file reference so results can be paired back
to mixed fd/path inputs without reordering assumptions.
Fields§
§file: FileOperand§offset: u64The resolved offset the read actually started at (never Cur/End
sentinels).
data: Vec<u8>§eof: boolTrue if the backend determined that the read reached end-of-file. A
short read alone does not imply EOF. A
backend with a server EOF flag (e.g. NFS) may report true even when
the requested length was returned exactly, because the read ended at
EOF. Always false for zero-length reads.
Trait Implementations§
Source§impl Clone for ReadResult
impl Clone for ReadResult
Source§fn clone(&self) -> ReadResult
fn clone(&self) -> ReadResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReadResult
impl RefUnwindSafe for ReadResult
impl Send for ReadResult
impl Sync for ReadResult
impl Unpin for ReadResult
impl UnsafeUnpin for ReadResult
impl UnwindSafe for ReadResult
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