pub struct ConnectionStatus {
pub state: ConnectionState,
pub since_ms: i64,
pub last_sample_ms: Option<i64>,
pub last_error: Option<String>,
pub reconnect_attempts: u32,
}Expand description
Connection health metadata so widgets can render outages and staleness accurately.
Fields§
§state: ConnectionState§since_ms: i64Unix timestamp (ms) when state last changed.
last_sample_ms: Option<i64>Unix timestamp (ms) of the most recently received live sample, if any.
last_error: Option<String>Sanitized description of the latest connection error, if any.
reconnect_attempts: u32Number of consecutive reconnect attempts since the last healthy connection.
Trait Implementations§
Source§impl Clone for ConnectionStatus
impl Clone for ConnectionStatus
Source§impl Debug for ConnectionStatus
impl Debug for ConnectionStatus
Source§impl<'de> Deserialize<'de> for ConnectionStatus
impl<'de> Deserialize<'de> for ConnectionStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConnectionStatus
Source§impl PartialEq for ConnectionStatus
impl PartialEq for ConnectionStatus
Source§impl Serialize for ConnectionStatus
impl Serialize for ConnectionStatus
impl StructuralPartialEq for ConnectionStatus
Auto Trait Implementations§
impl Forget for ConnectionStatus
impl Freeze for ConnectionStatus
impl Move for ConnectionStatus
impl RefUnwindSafe for ConnectionStatus
impl Send for ConnectionStatus
impl Sync for ConnectionStatus
impl Unpin for ConnectionStatus
impl UnsafeUnpin for ConnectionStatus
impl UnwindSafe for ConnectionStatus
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