pub struct SessionConnectionMonitor(/* private fields */);
Expand description
Monitor for connection changes in the Session
.
This is largely for informational purposes.
Implementations§
Source§impl SessionConnectionMonitor
impl SessionConnectionMonitor
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns true if the Session
is currently connected.
Note that this may not be accurate if connection has been recently lost.
Sourcepub async fn connected(&self)
pub async fn connected(&self)
Wait until the Session
is connected.
Returns immediately if already connected.
Sourcepub async fn disconnected(&self)
pub async fn disconnected(&self)
Wait until the Session
is disconnected.
Returns immediately if already disconnected.
Trait Implementations§
Source§impl Clone for SessionConnectionMonitor
impl Clone for SessionConnectionMonitor
Source§fn clone(&self) -> SessionConnectionMonitor
fn clone(&self) -> SessionConnectionMonitor
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 SessionConnectionMonitor
impl RefUnwindSafe for SessionConnectionMonitor
impl Send for SessionConnectionMonitor
impl Sync for SessionConnectionMonitor
impl Unpin for SessionConnectionMonitor
impl UnwindSafe for SessionConnectionMonitor
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