pub struct Stats { /* private fields */ }
Expand description
Contains statistics related to Tcp.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn sent(&self) -> (u64, u64)
pub fn sent(&self) -> (u64, u64)
Returns the number of sent messages and their collective size in bytes.
Sourcepub fn received(&self) -> (u64, u64)
pub fn received(&self) -> (u64, u64)
Returns the number of received messages and their collective size in bytes.
Sourcepub fn register_sent_message(&self, size: usize)
pub fn register_sent_message(&self, size: usize)
Registers a sent message of the provided size
in bytes.
Sourcepub fn register_received_message(&self, size: usize)
pub fn register_received_message(&self, size: usize)
Registers a received message of the provided size
in bytes.
Sourcepub fn register_failure(&self)
pub fn register_failure(&self)
Registers a failure.
Auto Trait Implementations§
impl !Freeze for Stats
impl !RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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