pub struct ThroughputMeter { /* private fields */ }Expand description
Throughput measurement helper for tracking data transfer rates.
Implementations§
Source§impl ThroughputMeter
impl ThroughputMeter
Sourcepub fn record_bytes(&self, bytes: u64)
pub fn record_bytes(&self, bytes: u64)
Record bytes transferred.
Sourcepub fn current_throughput(&self) -> f64
pub fn current_throughput(&self) -> f64
Get current throughput in bytes per second.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Get total bytes transferred.
Trait Implementations§
Source§impl Debug for ThroughputMeter
impl Debug for ThroughputMeter
Auto Trait Implementations§
impl Freeze for ThroughputMeter
impl RefUnwindSafe for ThroughputMeter
impl Send for ThroughputMeter
impl Sync for ThroughputMeter
impl Unpin for ThroughputMeter
impl UnsafeUnpin for ThroughputMeter
impl UnwindSafe for ThroughputMeter
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