pub struct ConnectionHealth {Show 15 fields
pub state: ConnectionState,
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 websocket_pings_sent: u64,
pub websocket_pongs_received: u64,
pub json_pings_sent: u64,
pub json_pongs_received: u64,
pub messages_sent: u64,
pub messages_received: u64,
pub reconnection_attempts: u64,
pub successful_reconnections: u64,
pub failed_reconnections: u64,
}Expand description
Detailed connection health information
Fields§
§state: ConnectionStateCurrent connection state
is_connected: boolWhether the WebSocket connection is established
is_authenticated: boolWhether the connection is authenticated and ready for trading
time_since_last_ping: Option<Duration>Time elapsed since last ping was sent
time_since_last_pong: Option<Duration>Time elapsed since last pong was received
time_since_auth: Option<Duration>Time elapsed since authentication was completed
websocket_pings_sent: u64Total WebSocket protocol pings sent
websocket_pongs_received: u64Total WebSocket protocol pongs received
json_pings_sent: u64Total JSON ping messages sent
json_pongs_received: u64Total JSON pong responses received
messages_sent: u64Total messages sent to server
messages_received: u64Total messages received from server
reconnection_attempts: u64Total reconnection attempts initiated
successful_reconnections: u64Total successful reconnections completed
failed_reconnections: u64Total failed reconnection attempts
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