pub struct RelayManagerStats {
pub connection_attempts: AtomicU64,
pub successful_connections: AtomicU64,
pub failed_connections: AtomicU64,
pub bytes_sent: AtomicU64,
pub bytes_received: AtomicU64,
pub datagrams_relayed: AtomicU64,
pub active_relays: AtomicU64,
}Expand description
Statistics for relay operations
Fields§
§connection_attempts: AtomicU64Total relay connection attempts
successful_connections: AtomicU64Successful relay connections
failed_connections: AtomicU64Failed relay connections
bytes_sent: AtomicU64Bytes sent through relays
bytes_received: AtomicU64Bytes received through relays
datagrams_relayed: AtomicU64Datagrams relayed
active_relays: AtomicU64Currently active relay connections
Implementations§
Source§impl RelayManagerStats
impl RelayManagerStats
Sourcepub fn record_attempt(&self, success: bool)
pub fn record_attempt(&self, success: bool)
Record a connection attempt
Sourcepub fn record_disconnect(&self)
pub fn record_disconnect(&self)
Record a disconnection
Sourcepub fn record_sent(&self, bytes: u64)
pub fn record_sent(&self, bytes: u64)
Record bytes sent
Sourcepub fn record_received(&self, bytes: u64)
pub fn record_received(&self, bytes: u64)
Record bytes received
Sourcepub fn active_count(&self) -> u64
pub fn active_count(&self) -> u64
Get active relay count
Trait Implementations§
Source§impl Debug for RelayManagerStats
impl Debug for RelayManagerStats
Source§impl Default for RelayManagerStats
impl Default for RelayManagerStats
Source§fn default() -> RelayManagerStats
fn default() -> RelayManagerStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RelayManagerStats
impl RefUnwindSafe for RelayManagerStats
impl Send for RelayManagerStats
impl Sync for RelayManagerStats
impl Unpin for RelayManagerStats
impl UnwindSafe for RelayManagerStats
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