pub enum ConnectionEvent {
Connecting {
attempt: u32,
},
Connected {
id: u64,
},
Disconnected {
reason: DisconnectReason,
},
ReconnectScheduled {
delay: Duration,
attempt: u32,
},
Error {
error: ConnectError,
attempt: u32,
},
FatalError {
error: ConnectError,
},
Shutdown,
}Expand description
Connection events broadcast to listeners
Variants§
Connecting
Starting connection attempt
Connected
Successfully connected
Disconnected
Disconnected
Fields
§
reason: DisconnectReasonReconnectScheduled
Reconnection scheduled
Error
Error occurred (non-fatal)
FatalError
Fatal error - will stop reconnecting
Fields
§
error: ConnectErrorShutdown
Shutdown initiated
Trait Implementations§
Source§impl Clone for ConnectionEvent
impl Clone for ConnectionEvent
Source§fn clone(&self) -> ConnectionEvent
fn clone(&self) -> ConnectionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConnectionEvent
impl RefUnwindSafe for ConnectionEvent
impl Send for ConnectionEvent
impl Sync for ConnectionEvent
impl Unpin for ConnectionEvent
impl UnwindSafe for ConnectionEvent
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