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 moreAuto Trait Implementations§
impl Freeze for ReconnectState
impl RefUnwindSafe for ReconnectState
impl Send for ReconnectState
impl Sync for ReconnectState
impl Unpin for ReconnectState
impl UnwindSafe for ReconnectState
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