pub struct BridgeStats {
pub messages_sent: u64,
pub messages_received: u64,
pub connection_attempts: u32,
pub last_error: Option<String>,
}Fields§
§messages_sent: u64§messages_received: u64§connection_attempts: u32§last_error: Option<String>Implementations§
Source§impl BridgeStats
impl BridgeStats
pub fn new() -> Self
pub fn record_sent(&mut self)
pub fn record_received(&mut self)
pub fn record_connection_attempt(&mut self)
pub fn record_error(&mut self, error: impl Into<String>)
pub fn clear_error(&mut self)
Trait Implementations§
Source§impl Clone for BridgeStats
impl Clone for BridgeStats
Source§fn clone(&self) -> BridgeStats
fn clone(&self) -> BridgeStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeStats
impl Debug for BridgeStats
Source§impl Default for BridgeStats
impl Default for BridgeStats
Source§fn default() -> BridgeStats
fn default() -> BridgeStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BridgeStats
impl RefUnwindSafe for BridgeStats
impl Send for BridgeStats
impl Sync for BridgeStats
impl Unpin for BridgeStats
impl UnwindSafe for BridgeStats
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