pub struct HubStats { /* private fields */ }Expand description
Traffic counters for a hub.
A hub sees every message twice over — once arriving, once or many times leaving — so its counters answer a different question than a device’s: not “how much traffic”, but “did the hub know where to send it”.
Implementations§
Source§impl HubStats
impl HubStats
pub fn new() -> HubStats
pub fn record_received(&self)
Sourcepub fn record_forwarded(&self, n: u64)
pub fn record_forwarded(&self, n: u64)
Record n copies delivered to known ports.
pub fn record_flooded(&self)
pub fn record_dropped(&self)
pub fn snapshot(&self) -> HubCounters
pub fn reset(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HubStats
impl RefUnwindSafe for HubStats
impl Send for HubStats
impl Sync for HubStats
impl Unpin for HubStats
impl UnsafeUnpin for HubStats
impl UnwindSafe for HubStats
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