pub struct ClientDisconnectEvent {
pub url: String,
pub reason: String,
pub will_reconnect: bool,
pub retry_after: Option<Duration>,
}Expand description
Lifecycle payload emitted when the client loses its websocket session.
Fields§
§url: StringDisconnected websocket URL.
reason: StringHuman-readable disconnect reason.
will_reconnect: boolWhether the client will keep trying to reconnect.
retry_after: Option<Duration>Delay before the next reconnect attempt when reconnect is enabled.
Trait Implementations§
Source§impl Clone for ClientDisconnectEvent
impl Clone for ClientDisconnectEvent
Source§fn clone(&self) -> ClientDisconnectEvent
fn clone(&self) -> ClientDisconnectEvent
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 ClientDisconnectEvent
impl RefUnwindSafe for ClientDisconnectEvent
impl Send for ClientDisconnectEvent
impl Sync for ClientDisconnectEvent
impl Unpin for ClientDisconnectEvent
impl UnsafeUnpin for ClientDisconnectEvent
impl UnwindSafe for ClientDisconnectEvent
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