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::WouldBlock
is translated toPoll::Pending
and the task is scheduled to be woken up in the future.ErrorKind::Interrupted
causes a retry.