pub struct ConnectionMetrics {
pub bytes_sent: u64,
pub bytes_received: u64,
pub rtt: Option<Duration>,
pub packet_loss: f64,
pub last_activity: Option<Instant>,
}Expand description
Connection metrics for P2P peers
Fields§
§bytes_sent: u64Bytes sent to this peer
bytes_received: u64Bytes received from this peer
rtt: Option<Duration>Round-trip time
packet_loss: f64Packet loss rate (0.0 to 1.0)
last_activity: Option<Instant>Last activity timestamp
Trait Implementations§
Source§impl Clone for ConnectionMetrics
impl Clone for ConnectionMetrics
Source§fn clone(&self) -> ConnectionMetrics
fn clone(&self) -> ConnectionMetrics
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionMetrics
impl Debug for ConnectionMetrics
Source§impl Default for ConnectionMetrics
impl Default for ConnectionMetrics
Source§fn default() -> ConnectionMetrics
fn default() -> ConnectionMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectionMetrics
impl RefUnwindSafe for ConnectionMetrics
impl Send for ConnectionMetrics
impl Sync for ConnectionMetrics
impl Unpin for ConnectionMetrics
impl UnwindSafe for ConnectionMetrics
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)