pub struct TransportStats {
pub packets_sent: u64,
pub packets_received: u64,
pub bytes_sent: u64,
pub bytes_received: u64,
pub avg_latency_ms: f64,
pub packet_loss_rate: f64,
pub bandwidth_usage: u64,
pub active_connections: usize,
pub dummy_packet_ratio: f64,
}Expand description
Statistics about transport layer performance
Fields§
§packets_sent: u64Total packets sent
packets_received: u64Total packets received
bytes_sent: u64Total bytes sent
bytes_received: u64Total bytes received
avg_latency_ms: f64Average latency in milliseconds
packet_loss_rate: f64Packet loss rate (0.0 to 1.0)
bandwidth_usage: u64Current bandwidth usage (bytes per second)
active_connections: usizeNumber of active connections
dummy_packet_ratio: f64Dummy packet ratio (for traffic shaping analysis)
Implementations§
Trait Implementations§
Source§impl Clone for TransportStats
impl Clone for TransportStats
Source§fn clone(&self) -> TransportStats
fn clone(&self) -> TransportStats
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 TransportStats
impl Debug for TransportStats
Source§impl Default for TransportStats
impl Default for TransportStats
Source§fn default() -> TransportStats
fn default() -> TransportStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransportStats
impl<'de> Deserialize<'de> for TransportStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TransportStats
impl RefUnwindSafe for TransportStats
impl Send for TransportStats
impl Sync for TransportStats
impl Unpin for TransportStats
impl UnsafeUnpin for TransportStats
impl UnwindSafe for TransportStats
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