pub struct ConnectionHealth {
pub id: u64,
pub remote_addr: SocketAddr,
pub state: ConnectionState,
pub uptime: Duration,
pub last_activity: Duration,
pub messages_sent: u64,
pub messages_received: u64,
pub bytes_sent: u64,
pub bytes_received: u64,
pub time_until_timeout: Option<Duration>,
}Expand description
Connection health information
Fields§
§id: u64Connection ID
remote_addr: SocketAddrRemote address
state: ConnectionStateConnection state
uptime: DurationHow long the connection has been active
last_activity: DurationTime since last activity
messages_sent: u64Number of messages sent
messages_received: u64Number of messages received
bytes_sent: u64Number of bytes sent
bytes_received: u64Number of bytes received
time_until_timeout: Option<Duration>Time until connection times out
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 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