pub struct Signals { /* private fields */ }Implementations§
Source§impl Signals
impl Signals
Sourcepub fn set_connected(&self)
pub fn set_connected(&self)
Call this when a connection is established.
Sourcepub fn set_disconnected(&self)
pub fn set_disconnected(&self)
Call this when a disconnection occurs.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check current connection state.
Sourcepub async fn wait_connected(&self)
pub async fn wait_connected(&self)
Wait for the next connection event.
Sourcepub async fn wait_disconnected(&self)
pub async fn wait_disconnected(&self)
Wait for the next disconnection event.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signals
impl RefUnwindSafe for Signals
impl Send for Signals
impl Sync for Signals
impl Unpin for Signals
impl UnsafeUnpin for Signals
impl UnwindSafe for Signals
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