pub struct ConnectionStats {
pub session_id: u32,
pub peer_addr: SocketAddr,
pub is_active: bool,
pub bytes_sent: u64,
pub bytes_received: u64,
pub buffer_usage: usize,
pub outgoing_queue_size: usize,
pub incoming_queue_size: usize,
pub last_activity: Instant,
}
Expand description
Connection statistics
Fields§
§session_id: u32
Unique session identifier
peer_addr: SocketAddr
Remote peer address
is_active: bool
Whether the connection is currently active
bytes_sent: u64
Total bytes sent in the current window
bytes_received: u64
Total bytes received in the current window
buffer_usage: usize
Current buffer usage (bytes)
outgoing_queue_size: usize
Number of queued outgoing packets
incoming_queue_size: usize
Number of queued incoming packets
last_activity: Instant
Timestamp of last activity
Trait Implementations§
Source§impl Clone for ConnectionStats
impl Clone for ConnectionStats
Source§fn clone(&self) -> ConnectionStats
fn clone(&self) -> ConnectionStats
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 ConnectionStats
impl RefUnwindSafe for ConnectionStats
impl Send for ConnectionStats
impl Sync for ConnectionStats
impl Unpin for ConnectionStats
impl UnwindSafe for ConnectionStats
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