Struct generic_api_client::websocket::ReconnectState
source · pub struct ReconnectState { /* private fields */ }
Expand description
A struct
to request the WebSocketConnection to perform a reconnect.
This struct
uses an Arc internally, so you can obtain multiple
ReconnectState
s for a single WebSocketConnection by cloning.
Implementations§
source§impl ReconnectState
impl ReconnectState
sourcepub fn is_reconnecting(&self) -> bool
pub fn is_reconnecting(&self) -> bool
Returns true
iff the WebSocketConnection is undergoing a reconnection process.
sourcepub fn request_reconnect(&self) -> bool
pub fn request_reconnect(&self) -> bool
Request the WebSocketConnection to perform a reconnect.
Will return false
if it is already in a reconnection process.
Trait Implementations§
source§impl Clone for ReconnectState
impl Clone for ReconnectState
source§fn clone(&self) -> ReconnectState
fn clone(&self) -> ReconnectState
Returns a copy 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 more