pub struct NetworkLatencyStats { /* private fields */ }Expand description
Network latency statistics
Implementations§
Source§impl NetworkLatencyStats
impl NetworkLatencyStats
pub fn new(max_samples: usize) -> Self
Sourcepub fn add_sample(&self, latency: Duration)
pub fn add_sample(&self, latency: Duration)
Add a new delayed sample
Sourcepub fn get_estimate(&self) -> Duration
pub fn get_estimate(&self) -> Duration
Get the current delay estimate
Sourcepub fn get_stats(&self) -> LatencyStats
pub fn get_stats(&self) -> LatencyStats
Get latency statistics
Auto Trait Implementations§
impl !Freeze for NetworkLatencyStats
impl !RefUnwindSafe for NetworkLatencyStats
impl Send for NetworkLatencyStats
impl Sync for NetworkLatencyStats
impl Unpin for NetworkLatencyStats
impl UnwindSafe for NetworkLatencyStats
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
Mutably borrows from an owned value. Read more