Struct libp2p_swarm::NetworkInfo
source · pub struct NetworkInfo { /* private fields */ }
Expand description
Information about the connections obtained by Swarm::network_info()
.
Implementations§
source§impl NetworkInfo
impl NetworkInfo
sourcepub fn num_peers(&self) -> usize
pub fn num_peers(&self) -> usize
The number of connected peers, i.e. peers with whom at least one established connection exists.
sourcepub fn connection_counters(&self) -> &ConnectionCounters
pub fn connection_counters(&self) -> &ConnectionCounters
Gets counters for ongoing network connections.
Trait Implementations§
source§impl Clone for NetworkInfo
impl Clone for NetworkInfo
source§fn clone(&self) -> NetworkInfo
fn clone(&self) -> NetworkInfo
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 more