pub trait Metrics {
// Provided methods
fn bytes_lost(&self) -> Option<u64> { ... }
fn packets_sent(&self) -> Option<u64> { ... }
fn packets_received(&self) -> Option<u64> { ... }
fn packets_lost(&self) -> Option<u64> { ... }
fn rtt(&self) -> Option<Duration> { ... }
fn estimated_send_rate(&self) -> Option<u64> { ... }
fn streams_evicted(&self) -> Option<u64> { ... }
}Expand description
Connection-level metrics a transport reports, beyond the byte counts its Wire holds.
Methods return Option: None means the implementation doesn’t track
this metric, while Some(0) means actually zero.
Provided Methods§
Sourcefn bytes_lost(&self) -> Option<u64>
fn bytes_lost(&self) -> Option<u64>
Total bytes lost (detected via retransmission or acknowledgement).
Sourcefn packets_sent(&self) -> Option<u64>
fn packets_sent(&self) -> Option<u64>
Total number of datagrams sent.
Sourcefn packets_received(&self) -> Option<u64>
fn packets_received(&self) -> Option<u64>
Total number of datagrams received.
Sourcefn packets_lost(&self) -> Option<u64>
fn packets_lost(&self) -> Option<u64>
Total number of datagrams detected as lost.
Sourcefn estimated_send_rate(&self) -> Option<u64>
fn estimated_send_rate(&self) -> Option<u64>
Estimated available send bandwidth, in bits per second.
Sourcefn streams_evicted(&self) -> Option<u64>
fn streams_evicted(&self) -> Option<u64>
Total receive streams evicted because incomplete messages exhausted the receive window.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".