pub enum ConnState {
Healthy,
Unhealthy {
since: Instant,
},
Reconnecting,
}Expand description
Connection health state.
Variants§
Healthy
Connection is working normally
Unhealthy
Connection has failed, tracking when it became unhealthy
Reconnecting
Connection is being replaced (reconnection in progress)
Implementations§
Source§impl ConnState
impl ConnState
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if the connection is in a healthy state.
Sourcepub fn is_reconnecting(&self) -> bool
pub fn is_reconnecting(&self) -> bool
Check if the connection is currently reconnecting.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnState
impl RefUnwindSafe for ConnState
impl Send for ConnState
impl Sync for ConnState
impl Unpin for ConnState
impl UnwindSafe for ConnState
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