#[non_exhaustive]pub struct Stats {
pub rtt: Option<Duration>,
pub estimated_send_rate: Option<Rate>,
pub estimated_recv_rate: Option<Rate>,
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<Rate>Estimated send bandwidth from the congestion controller.
estimated_recv_rate: Option<Rate>Estimated receive bandwidth from MoQ PROBE.
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.