pub struct ThroughputTracker { /* private fields */ }
Expand description
Throughput tracking
Implementations§
Source§impl ThroughputTracker
impl ThroughputTracker
Sourcepub fn record_sent(&self, bytes: u64)
pub fn record_sent(&self, bytes: u64)
Record bytes sent and increment packet count
Sourcepub fn record_received(&self, bytes: u64)
pub fn record_received(&self, bytes: u64)
Record bytes received and increment packet count
Sourcepub fn summary(&self) -> ThroughputSummary
pub fn summary(&self) -> ThroughputSummary
Produce a summary snapshot of throughput metrics
Trait Implementations§
Source§impl Debug for ThroughputTracker
impl Debug for ThroughputTracker
Auto Trait Implementations§
impl !Freeze for ThroughputTracker
impl RefUnwindSafe for ThroughputTracker
impl Send for ThroughputTracker
impl Sync for ThroughputTracker
impl Unpin for ThroughputTracker
impl UnwindSafe for ThroughputTracker
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