#[non_exhaustive]pub struct ConnectionStats {
pub rtt: Option<Duration>,
pub estimated_send_rate: Option<u64>,
pub estimated_recv_rate: Option<u64>,
pub bytes_sent: Option<u64>,
pub bytes_received: Option<u64>,
pub bytes_lost: Option<u64>,
pub packets_sent: Option<u64>,
pub packets_received: Option<u64>,
pub packets_lost: Option<u64>,
}Expand description
A snapshot of connection statistics for a Session.
Every field is optional: availability depends on the transport backend (native QUIC
reports all of them, the browser WebTransport reports few or none) and on the
connection state (e.g. estimated_send_rate is None until the congestion controller
has a window). None means “not reported”, not “zero”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rtt: Option<Duration>Smoothed round-trip time estimate.
estimated_send_rate: Option<u64>Estimated send bandwidth from the congestion controller, in bits per second.
estimated_recv_rate: Option<u64>Estimated receive bandwidth from MoQ PROBE, in bits per second.
None unless the negotiated version supports PROBE (moq-lite-03+).
bytes_sent: Option<u64>Total bytes sent over the connection, including retransmissions and overhead.
bytes_received: Option<u64>Total bytes received over the connection, including duplicates and overhead.
bytes_lost: Option<u64>Total bytes lost (detected via retransmission or acknowledgement).
packets_sent: Option<u64>Total datagrams sent.
packets_received: Option<u64>Total datagrams received.
packets_lost: Option<u64>Total datagrams detected as lost.
Trait Implementations§
Source§impl Clone for ConnectionStats
impl Clone for ConnectionStats
Source§fn clone(&self) -> ConnectionStats
fn clone(&self) -> ConnectionStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more