pub struct Reconnect { /* private fields */ }Expand description
Implementations§
Source§impl Reconnect
impl Reconnect
Sourcepub fn poll_status(&mut self, waiter: &Waiter) -> Poll<Result<Status>>
pub fn poll_status(&mut self, waiter: &Waiter) -> Poll<Result<Status>>
Poll for the next connection status change since this handle last reported one.
Ready(Ok(status)) on a change, Ready(Err) once the loop has stopped (the give-up error,
or a generic one when the handle is dropped), Pending otherwise.
Sourcepub async fn status(&mut self) -> Result<Status>
pub async fn status(&mut self) -> Result<Status>
Wait until the connection status changes from what this handle last reported.
Returns the current Status. The loop alternates Connected/Disconnected, so successive
calls alternate too; but a status that flips and flips back before the caller polls is
reported once. This tracks the current state, not every edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reconnect
impl RefUnwindSafe for Reconnect
impl Send for Reconnect
impl Sync for Reconnect
impl Unpin for Reconnect
impl UnsafeUnpin for Reconnect
impl UnwindSafe for Reconnect
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