Skip to main content

Metrics

Trait Metrics 

Source
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§

Source

fn bytes_lost(&self) -> Option<u64>

Total bytes lost (detected via retransmission or acknowledgement).

Source

fn packets_sent(&self) -> Option<u64>

Total number of datagrams sent.

Source

fn packets_received(&self) -> Option<u64>

Total number of datagrams received.

Source

fn packets_lost(&self) -> Option<u64>

Total number of datagrams detected as lost.

Source

fn rtt(&self) -> Option<Duration>

Smoothed round-trip time estimate.

Source

fn estimated_send_rate(&self) -> Option<u64>

Estimated available send bandwidth, in bits per second.

Source

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".

Implementors§