Struct nostr_sdk::relay::RelayConnectionStats
source · pub struct RelayConnectionStats { /* private fields */ }
Expand description
Relay
connection stats
Implementations§
source§impl RelayConnectionStats
impl RelayConnectionStats
sourcepub fn success(&self) -> usize
pub fn success(&self) -> usize
The number of times a connection has been successfully established
sourcepub fn bytes_sent(&self) -> usize
pub fn bytes_sent(&self) -> usize
Bytes sent
sourcepub fn bytes_received(&self) -> usize
pub fn bytes_received(&self) -> usize
Bytes received
sourcepub fn connected_at(&self) -> Timestamp
pub fn connected_at(&self) -> Timestamp
Get the UNIX timestamp of the last started connection
sourcepub fn latency_blocking(&self) -> Option<Duration>
pub fn latency_blocking(&self) -> Option<Duration>
Calculate latency
Trait Implementations§
source§impl Clone for RelayConnectionStats
impl Clone for RelayConnectionStats
source§fn clone(&self) -> RelayConnectionStats
fn clone(&self) -> RelayConnectionStats
Returns a copy 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 RelayConnectionStats
impl Debug for RelayConnectionStats
Auto Trait Implementations§
impl !RefUnwindSafe for RelayConnectionStats
impl Send for RelayConnectionStats
impl Sync for RelayConnectionStats
impl Unpin for RelayConnectionStats
impl !UnwindSafe for RelayConnectionStats
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