pub enum ReadOutcome {
Bytes(NonZeroUsize),
Pending(PendingReason),
Eof,
}Expand description
Outcome of a Source::read_at call.
Each variant has distinct caller semantics — there is no
overload of a numeric zero. Bytes carries a typed
NonZeroUsize so the type system guarantees forward progress;
Pending carries an explicit PendingReason; Eof is terminal.
Variants§
Bytes(NonZeroUsize)
Source produced count bytes (count > 0 by construction).
Pending(PendingReason)
Source did not make progress this call. See PendingReason
for the precise cause and required caller action.
Eof
Natural end of stream — no more bytes will ever come from this source at this offset.
Trait Implementations§
Source§impl Clone for ReadOutcome
impl Clone for ReadOutcome
Source§fn clone(&self) -> ReadOutcome
fn clone(&self) -> ReadOutcome
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 moreSource§impl Debug for ReadOutcome
impl Debug for ReadOutcome
Source§impl PartialEq for ReadOutcome
impl PartialEq for ReadOutcome
Source§fn eq(&self, other: &ReadOutcome) -> bool
fn eq(&self, other: &ReadOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ReadOutcome
impl Eq for ReadOutcome
impl StructuralPartialEq for ReadOutcome
Auto Trait Implementations§
impl Freeze for ReadOutcome
impl RefUnwindSafe for ReadOutcome
impl Send for ReadOutcome
impl Sync for ReadOutcome
impl Unpin for ReadOutcome
impl UnsafeUnpin for ReadOutcome
impl UnwindSafe for ReadOutcome
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