Enum partial_io::PartialOp
source · [−]Expand description
What to do the next time an IO operation is performed.
This is not the same as io::Result<Option<usize>> because it contains
io::ErrorKind instances, not io::Error instances. This allows it to be
clonable.
Variants
Limited(usize)
Limit the next IO operation to a certain number of bytes.
The wrapper will call into the inner Read or Write
instance. Depending on what the underlying operation does, this may
return an error or a fewer number of bytes.
Some methods like Write::flush and AsyncWrite::poll_flush don’t
have a limit. For these methods, Limited(n) behaves the same as
Unlimited.
Unlimited
Do not limit the next IO operation.
The wrapper will call into the inner Read or Write
instance. Depending on what the underlying operation does, this may
return an error or a limited number of bytes.
Err(ErrorKind)
Return an error instead of calling into the underlying operation.
For methods on Async traits:
ErrorKind::WouldBlockis translated toPoll::Pendingand the task is scheduled to be woken up in the future.ErrorKind::Interruptedcauses a retry.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PartialOp
impl Send for PartialOp
impl Sync for PartialOp
impl Unpin for PartialOp
impl UnwindSafe for PartialOp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more