pub enum SocketEvent {
Connecting {
attempt: u32,
},
Connected,
Disconnected {
reason: DisconnectReason,
},
ReconnectScheduled {
attempt: u32,
delay: Duration,
},
ReconnectStopped {
attempt: u32,
reason: DisconnectReason,
},
Closed,
Lagged {
dropped: u64,
},
}Expand description
Socket connection and reconnect lifecycle notification.
Variants§
Connecting
A transport connection attempt started.
Connected
The transport connected successfully.
Disconnected
The connection ended or was explicitly disconnected.
Fields
§
reason: DisconnectReasonCondition that ended the connection.
ReconnectScheduled
An automatic reconnect was scheduled.
Fields
ReconnectStopped
The reconnect policy chose not to retry.
Fields
§
reason: DisconnectReasonCondition supplied to the reconnect policy.
Closed
The client driver shut down permanently.
Lagged
This bounded event subscriber fell behind.
Trait Implementations§
Source§impl Clone for SocketEvent
impl Clone for SocketEvent
Source§fn clone(&self) -> SocketEvent
fn clone(&self) -> SocketEvent
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 SocketEvent
impl Debug for SocketEvent
Source§impl PartialEq for SocketEvent
impl PartialEq for SocketEvent
Source§fn eq(&self, other: &SocketEvent) -> bool
fn eq(&self, other: &SocketEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SocketEvent
Auto Trait Implementations§
impl Freeze for SocketEvent
impl RefUnwindSafe for SocketEvent
impl Send for SocketEvent
impl Sync for SocketEvent
impl Unpin for SocketEvent
impl UnsafeUnpin for SocketEvent
impl UnwindSafe for SocketEvent
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