#[non_exhaustive]pub enum Outage<E> {
Closed {
code: Option<u16>,
reason: String,
},
Error(E),
Stale {
silent: Duration,
},
Rotation,
}Expand description
Why a connection went down, for Protocol::disconnected, which owns it,
so a protocol’s marker can carry the error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Closed
The server closed the connection: with a close frame, whose code and reason these are, or by ending the stream with none (no code and an empty reason).
Fields
Error(E)
A failure: a read, a ping, a decoded frame Protocol::recover sent
to a reconnect, or the first connection attempt of
Supervisor::start.
Stale
Nothing that counts as liveness arrived for the staleness window, or a membership change went unanswered for it.
Rotation
Replaced on purpose at Timing::max_connection_age.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Outage<E>where
E: Freeze,
impl<E> RefUnwindSafe for Outage<E>where
E: RefUnwindSafe,
impl<E> Send for Outage<E>where
E: Send,
impl<E> Sync for Outage<E>where
E: Sync,
impl<E> Unpin for Outage<E>where
E: Unpin,
impl<E> UnsafeUnpin for Outage<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Outage<E>where
E: UnwindSafe,
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