pub enum DisconnectIntent {
Client,
Server,
Network,
}Expand description
Who initiated the disconnect captured by
ConnectionEvent::Disconnected / ConnectionState::Closed.
Lets consumers branch on the cause without string-matching the
reason field.
Variants§
Client
Local caller invoked disconnect() or shutdown_with_timeout(...).
Server
Server sent a Close frame (regardless of close code).
Network
Transport-level failure: I/O error, EOF without Close frame, heartbeat timeout, etc.
Trait Implementations§
Source§impl Clone for DisconnectIntent
impl Clone for DisconnectIntent
Source§fn clone(&self) -> DisconnectIntent
fn clone(&self) -> DisconnectIntent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DisconnectIntent
impl Debug for DisconnectIntent
Source§impl PartialEq for DisconnectIntent
impl PartialEq for DisconnectIntent
Source§fn eq(&self, other: &DisconnectIntent) -> bool
fn eq(&self, other: &DisconnectIntent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DisconnectIntent
impl Eq for DisconnectIntent
impl StructuralPartialEq for DisconnectIntent
Auto Trait Implementations§
impl Freeze for DisconnectIntent
impl RefUnwindSafe for DisconnectIntent
impl Send for DisconnectIntent
impl Sync for DisconnectIntent
impl Unpin for DisconnectIntent
impl UnsafeUnpin for DisconnectIntent
impl UnwindSafe for DisconnectIntent
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
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
Compare self to
key and return true if they are equal.