#[non_exhaustive]pub struct Stats {
pub rtt: Option<Duration>,
pub estimated_send_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>,
pub streams_evicted: Option<u64>,
pub credit_stalls: Option<u64>,
pub credit_stalled: Option<Duration>,
pub datagrams_unrouted: 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.
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.
streams_evicted: Option<u64>Total receive streams evicted because incomplete messages exhausted the receive window. A count above zero means the receive window is too small for what the peer sends.
credit_stalls: Option<u64>Total times the sender blocked with all the peer’s connection-level credit (MAX_DATA)
spent: an episode starts when a write blocks with every credited byte sent, and ends when
the peer grants more. A count rising while Self::credit_stalled grows means the peer
is not granting credit, rather than loss or congestion slowing the session.
credit_stalled: Option<Duration>Total time the sender spent blocked on the peer’s connection-level credit, across
Self::credit_stalls. A wait in progress counts up to the transport’s latest step.
datagrams_unrouted: Option<u64>Total datagrams received for a subscription with no datagram track: one this session
doesn’t know, has ended, or whose answer it hasn’t received. None on a version without
datagrams: moq-transport and moq-lite before 05.
Trait Implementations§
impl Copy for Stats
impl Eq for Stats
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.