pub struct WsHealthSnapshot {
pub latency_ms: Option<i64>,
pub messages_received: u64,
pub messages_dropped: u64,
pub last_message_time: Option<i64>,
pub connection_uptime_ms: u64,
pub reconnect_count: u32,
}Expand description
Health snapshot for WebSocket connection monitoring.
Provides metrics for monitoring connection health and performance.
Fields§
§latency_ms: Option<i64>Round-trip latency in milliseconds (from ping/pong)
messages_received: u64Total number of messages received
messages_dropped: u64Number of messages dropped due to backpressure
last_message_time: Option<i64>Timestamp of the last received message (milliseconds since epoch)
connection_uptime_ms: u64Connection uptime in milliseconds
reconnect_count: u32Number of reconnection attempts
Implementations§
Source§impl WsHealthSnapshot
impl WsHealthSnapshot
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Returns true if the connection appears healthy
Trait Implementations§
Source§impl Clone for WsHealthSnapshot
impl Clone for WsHealthSnapshot
Source§fn clone(&self) -> WsHealthSnapshot
fn clone(&self) -> WsHealthSnapshot
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 WsHealthSnapshot
impl Debug for WsHealthSnapshot
Source§impl Default for WsHealthSnapshot
impl Default for WsHealthSnapshot
Source§fn default() -> WsHealthSnapshot
fn default() -> WsHealthSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WsHealthSnapshot
impl RefUnwindSafe for WsHealthSnapshot
impl Send for WsHealthSnapshot
impl Sync for WsHealthSnapshot
impl Unpin for WsHealthSnapshot
impl UnsafeUnpin for WsHealthSnapshot
impl UnwindSafe for WsHealthSnapshot
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