pub enum Readiness {
Ready,
Close,
Terminate,
}Expand description
Filter readiness state.
Variants§
Ready
The I/O task may proceed with I/O operations.
Close
The transport must be closed gracefully.
The I/O task must close both directions of the connection and then
release it. For a socket this is shutdown(SHUT_RDWR) followed by
close(). Any operation still in flight should be canceled.
During a graceful shutdown buffered output is drained before this is reported. If the connection ended because of a failure or an expired shutdown deadline, output may instead be undeliverable and discarded. In every case the I/O task must not attempt another flush.
Terminate
The transport must be released immediately.
This is reported only for an explicit force close through
IoRef::terminate, so whatever is still
buffered is discarded on purpose. The I/O task must not perform a
graceful close: no receive queue drain and no shutdown(SHUT_RDWR),
just release the connection. That keeps an aborted stream
distinguishable from one that ended normally, instead of terminating a
truncated response with a clean FIN.
A connection that ends because of an I/O failure, a filter failure or an
expired shutdown deadline reports Close instead: the
transport is gone or unusable, so there is nothing to gain from
aborting it.
Implementations§
Trait Implementations§
impl Copy for Readiness
impl Eq for Readiness
impl StructuralPartialEq for Readiness
Auto Trait Implementations§
impl Freeze for Readiness
impl RefUnwindSafe for Readiness
impl Send for Readiness
impl Sync for Readiness
impl Unpin for Readiness
impl UnsafeUnpin for Readiness
impl UnwindSafe for Readiness
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.