pub struct PeerConnection {
pub peer_id: PeerId,
pub remote_addr: SocketAddr,
pub authenticated: bool,
pub connected_at: Instant,
pub last_activity: Instant,
}Expand description
Connection information for a peer
Fields§
§peer_id: PeerIdRemote peer’s ID
remote_addr: SocketAddrRemote address
authenticated: boolWhether peer is authenticated
connected_at: InstantConnection established time
last_activity: InstantLast activity time
Trait Implementations§
Source§impl Clone for PeerConnection
impl Clone for PeerConnection
Source§fn clone(&self) -> PeerConnection
fn clone(&self) -> PeerConnection
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 moreAuto Trait Implementations§
impl Freeze for PeerConnection
impl RefUnwindSafe for PeerConnection
impl Send for PeerConnection
impl Sync for PeerConnection
impl Unpin for PeerConnection
impl UnwindSafe for PeerConnection
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)