pub struct ThroughputLedger { /* private fields */ }Implementations§
Source§impl ThroughputLedger
impl ThroughputLedger
pub const fn new() -> Self
pub fn record_rx(&mut self, now: InstantMillis, bytes: u64)
pub fn record_tx(&mut self, now: InstantMillis, bytes: u64)
pub fn rates(&self) -> TransferRates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThroughputLedger
impl RefUnwindSafe for ThroughputLedger
impl Send for ThroughputLedger
impl Sync for ThroughputLedger
impl Unpin for ThroughputLedger
impl UnsafeUnpin for ThroughputLedger
impl UnwindSafe for ThroughputLedger
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