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§
source§impl 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§
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