pub struct StatsCollector { /* private fields */ }Expand description
Statistics collector for multiple devices
Implementations§
Source§impl StatsCollector
impl StatsCollector
Sourcepub fn get_device_stats(&self, device_id: u32, address: String) -> DeviceStats
pub fn get_device_stats(&self, device_id: u32, address: String) -> DeviceStats
Get or create device statistics
Sourcepub fn update_device_stats<F>(&self, device_id: u32, updater: F)where
F: FnOnce(&mut DeviceStats),
pub fn update_device_stats<F>(&self, device_id: u32, updater: F)where
F: FnOnce(&mut DeviceStats),
Update device statistics
Sourcepub fn get_global_stats(&self) -> CommunicationStats
pub fn get_global_stats(&self) -> CommunicationStats
Get global statistics
Sourcepub fn update_global_stats<F>(&self, updater: F)where
F: FnOnce(&mut CommunicationStats),
pub fn update_global_stats<F>(&self, updater: F)where
F: FnOnce(&mut CommunicationStats),
Update global statistics
Sourcepub fn get_all_device_stats(&self) -> Vec<DeviceStats>
pub fn get_all_device_stats(&self) -> Vec<DeviceStats>
Get all device statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatsCollector
impl RefUnwindSafe for StatsCollector
impl Send for StatsCollector
impl Sync for StatsCollector
impl Unpin for StatsCollector
impl UnsafeUnpin for StatsCollector
impl UnwindSafe for StatsCollector
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