Struct libp2p::bandwidth::BandwidthSinks
source · [−]pub struct BandwidthSinks { /* private fields */ }
Expand description
Allows obtaining the average bandwidth of the connections created from a BandwidthLogging
.
Implementations
sourceimpl BandwidthSinks
impl BandwidthSinks
sourcepub fn total_inbound(&self) -> u64
pub fn total_inbound(&self) -> u64
Returns the total number of bytes that have been downloaded on all the connections spawned
through the BandwidthLogging
.
Note: This method is by design subject to race conditions. The returned value should only ever be used for statistics purposes.
sourcepub fn total_outbound(&self) -> u64
pub fn total_outbound(&self) -> u64
Returns the total number of bytes that have been uploaded on all the connections spawned
through the BandwidthLogging
.
Note: This method is by design subject to race conditions. The returned value should only ever be used for statistics purposes.
Auto Trait Implementations
impl !RefUnwindSafe for BandwidthSinks
impl Send for BandwidthSinks
impl Sync for BandwidthSinks
impl Unpin for BandwidthSinks
impl UnwindSafe for BandwidthSinks
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more