pub struct RelayClientStats {
pub bytes_sent: AtomicU64,
pub bytes_received: AtomicU64,
pub datagrams_sent: AtomicU64,
pub datagrams_received: AtomicU64,
pub contexts_registered: AtomicU64,
pub connection_attempts: AtomicU64,
}Expand description
Statistics for the relay client
Fields§
§bytes_sent: AtomicU64Bytes sent through relay
bytes_received: AtomicU64Bytes received through relay
datagrams_sent: AtomicU64Datagrams sent
datagrams_received: AtomicU64Datagrams received
contexts_registered: AtomicU64Contexts registered
connection_attempts: AtomicU64Connection attempts
Implementations§
Source§impl RelayClientStats
impl RelayClientStats
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 record_context(&self)
pub fn record_context(&self)
Record a context registration
Sourcepub fn total_sent(&self) -> u64
pub fn total_sent(&self) -> u64
Total bytes sent
Sourcepub fn total_received(&self) -> u64
pub fn total_received(&self) -> u64
Total bytes received
Trait Implementations§
Source§impl Debug for RelayClientStats
impl Debug for RelayClientStats
Source§impl Default for RelayClientStats
impl Default for RelayClientStats
Source§fn default() -> RelayClientStats
fn default() -> RelayClientStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RelayClientStats
impl RefUnwindSafe for RelayClientStats
impl Send for RelayClientStats
impl Sync for RelayClientStats
impl Unpin for RelayClientStats
impl UnwindSafe for RelayClientStats
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