pub enum ConnectionEvent {
Connected,
Disconnected {
reason: DisconnectionReason,
},
Reconnecting {
attempt: u32,
},
ReconnectionFailed {
reason: String,
},
HeartbeatMissed,
SubscriptionPreserved {
count: usize,
},
SubscriptionRestored {
count: usize,
},
}Expand description
Connection events that can be emitted
Variants§
Connected
Connection has been established successfully
Disconnected
Connection has been lost
Fields
§
reason: DisconnectionReasonReason for the disconnection
Reconnecting
Reconnection attempt is in progress
ReconnectionFailed
Reconnection has failed
HeartbeatMissed
A heartbeat message was missed
SubscriptionPreserved
Subscriptions have been preserved during disconnection
SubscriptionRestored
Subscriptions have been restored after reconnection
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 (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 ConnectionEvent
impl Debug for ConnectionEvent
impl Eq for ConnectionEvent
Source§impl PartialEq for ConnectionEvent
impl PartialEq for ConnectionEvent
Source§fn eq(&self, other: &ConnectionEvent) -> bool
fn eq(&self, other: &ConnectionEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ConnectionEvent
Auto Trait Implementations§
impl Freeze for ConnectionEvent
impl RefUnwindSafe for ConnectionEvent
impl Send for ConnectionEvent
impl Sync for ConnectionEvent
impl Unpin for ConnectionEvent
impl UnsafeUnpin 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