pub struct StatisticsTracker { /* private fields */ }Expand description
Internal statistics tracker with atomic operations for performance
Implementations§
Source§impl StatisticsTracker
impl StatisticsTracker
pub fn new() -> Self
pub async fn record_connection_attempt(&self)
pub async fn record_connection_success(&self)
pub async fn record_connection_failure(&self, reason: Option<String>)
pub async fn record_disconnection(&self, reason: Option<String>)
pub async fn record_reconnection(&self)
pub async fn record_message_sent(&self, message: &Message)
pub async fn record_message_received(&self, message: &Message)
pub async fn get_stats(&self) -> ConnectionStats
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StatisticsTracker
impl !RefUnwindSafe for StatisticsTracker
impl Send for StatisticsTracker
impl Sync for StatisticsTracker
impl Unpin for StatisticsTracker
impl UnsafeUnpin for StatisticsTracker
impl !UnwindSafe for StatisticsTracker
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