#[non_exhaustive]pub enum ConnectionTermination {
IncomingClosed,
LocalShutdown,
ForegroundError(Error),
TransportError(Error),
HandlerError(Error),
Dropped,
}Expand description
Why a driven connection stopped.
A connection driven by Builder::connect_to
or Builder::connect_with publishes
exactly one termination, observable through
ConnectionTo::terminated and
ConnectionTo::termination.
Unlike ConnectionTo::incoming_closed,
which only reports clean incoming EOF, termination covers every way the
connection driver can end.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IncomingClosed
The incoming transport reached clean EOF and the driver finished successfully.
This is also reported when a connect_with foreground returns Ok
after observing clean EOF.
LocalShutdown
The connect_with foreground returned Ok before incoming EOF,
initiating a local shutdown that completed successfully.
ForegroundError(Error)
The connect_with foreground returned an error.
TransportError(Error)
The transport driver failed to read, write, or drain.
HandlerError(Error)
A message handler, close callback, runner, or spawned task failed.
Dropped
The driver future was dropped before it completed.
Only synchronous bookkeeping happens on drop: pending requests are failed and this termination is published. No asynchronous cleanup, close callbacks, or output draining run after an arbitrary drop.
Implementations§
Trait Implementations§
Source§impl Clone for ConnectionTermination
impl Clone for ConnectionTermination
Source§impl Debug for ConnectionTermination
impl Debug for ConnectionTermination
impl Eq for ConnectionTermination
Source§impl PartialEq for ConnectionTermination
impl PartialEq for ConnectionTermination
impl StructuralPartialEq for ConnectionTermination
Auto Trait Implementations§
impl Freeze for ConnectionTermination
impl RefUnwindSafe for ConnectionTermination
impl Send for ConnectionTermination
impl Sync for ConnectionTermination
impl Unpin for ConnectionTermination
impl UnsafeUnpin for ConnectionTermination
impl UnwindSafe for ConnectionTermination
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.