pub struct ConnectionInfo {
pub peer_id: PeerId,
pub remote_address: SocketAddr,
pub connected_at: Instant,
pub bytes_sent: u64,
pub bytes_received: u64,
pub last_activity: Instant,
pub rtt: Option<Duration>,
pub packet_loss: f64,
pub nat_type: String,
}Expand description
Connection information
Fields§
§peer_id: PeerId§remote_address: SocketAddr§connected_at: Instant§bytes_sent: u64§bytes_received: u64§last_activity: Instant§rtt: Option<Duration>§packet_loss: f64§nat_type: StringTrait Implementations§
Source§impl Clone for ConnectionInfo
impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
fn clone(&self) -> ConnectionInfo
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ConnectionInfo
impl RefUnwindSafe for ConnectionInfo
impl Send for ConnectionInfo
impl Sync for ConnectionInfo
impl Unpin for ConnectionInfo
impl UnwindSafe for ConnectionInfo
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