pub enum ReadInspectDecision {
ContinueRead,
Complete(usize),
Failed(Box<dyn Error + Send + Sync>),
}Expand description
A flow control decision made during conditional reads.
Variants§
ContinueRead
Continues reading.
If the byte budget has been exhausted for “read at most N bytes” reads (i.e. there are already N bytes buffered),
the read terminates with an error.
Complete(usize)
Completes reading from the stream, consuming the indicated number of bytes.
Any remaining bytes are kept in a BytesBuf returned alongside the read data,
allowing the buffer to be efficiently reused for a follow-up read operation.
Failed(Box<dyn Error + Send + Sync>)
Stops reading and signals the provided error as the result.
The provided error will be wrapped in a bytesbuf_io::Error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadInspectDecision
impl !RefUnwindSafe for ReadInspectDecision
impl Send for ReadInspectDecision
impl Sync for ReadInspectDecision
impl Unpin for ReadInspectDecision
impl !UnwindSafe for ReadInspectDecision
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