Struct snarkos_node_tcp::Stats
source · 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.
Trait Implementations§
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