pub struct ConnectionHealth {
pub state: WebSocketConnectionState,
pub is_connected: bool,
pub is_authenticated: bool,
pub time_since_last_ping: Option<Duration>,
pub time_since_last_pong: Option<Duration>,
pub time_since_auth: Option<Duration>,
pub is_healthy: bool,
pub reconnection_attempts: u32,
pub next_reconnection_in: Option<Duration>,
}Expand description
Standard health information for WebSocket connections
Provides consistent health monitoring metrics across all exchanges
Fields§
§state: WebSocketConnectionStateCurrent connection state
is_connected: boolWhether the WebSocket is connected
is_authenticated: boolWhether authentication is completed
time_since_last_ping: Option<Duration>Time since last ping was sent
time_since_last_pong: Option<Duration>Time since last pong was received
time_since_auth: Option<Duration>Time since authentication completed
is_healthy: boolWhether the connection is considered healthy
reconnection_attempts: u32Current reconnection attempt count
next_reconnection_in: Option<Duration>Time until next reconnection attempt
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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConnectionHealth
impl RefUnwindSafe for ConnectionHealth
impl Send for ConnectionHealth
impl Sync for ConnectionHealth
impl Unpin 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