pub struct ConnectionHealth {
pub ws_connected: bool,
pub reconnect_count: u32,
pub total_attempts: u64,
pub last_reconnect_at: Option<DateTime<Utc>>,
}Expand description
A connection health roll-up for the status bar.
Fields§
§ws_connected: boolWhether the WS is currently up.
reconnect_count: u32Failed-connect attempts since the last successful connect. Drives the “reconnecting (attempt N)…” status-bar hint and resets to zero the moment the socket is up again.
total_attempts: u64Lifetime reconnect attempts. Never resets. Used by observability tooling (and tests) that need to see that a reconnect happened even after the subscriber recovered.
last_reconnect_at: Option<DateTime<Utc>>When the most recent reconnect attempt began. Useful for rendering “reconnecting in 2s…” hints.
Trait Implementations§
Source§impl Clone for ConnectionHealth
impl Clone for ConnectionHealth
Source§fn clone(&self) -> ConnectionHealth
fn clone(&self) -> ConnectionHealth
Returns a duplicate 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 moreSource§impl Debug for ConnectionHealth
impl Debug for ConnectionHealth
Source§impl Default for ConnectionHealth
impl Default for ConnectionHealth
Source§fn default() -> ConnectionHealth
fn default() -> ConnectionHealth
Returns the “default value” for a type. Read more
Source§impl PartialEq for ConnectionHealth
impl PartialEq for ConnectionHealth
impl Copy for ConnectionHealth
impl Eq for ConnectionHealth
impl StructuralPartialEq for ConnectionHealth
Auto Trait Implementations§
impl Freeze for ConnectionHealth
impl RefUnwindSafe for ConnectionHealth
impl Send for ConnectionHealth
impl Sync for ConnectionHealth
impl Unpin for ConnectionHealth
impl UnsafeUnpin for ConnectionHealth
impl UnwindSafe for ConnectionHealth
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