Trait mixnet::core::NetworkStatus
source · pub trait NetworkStatus {
// Required methods
fn local_peer_id(&self) -> PeerId;
fn is_connected(&self, peer_id: &PeerId) -> bool;
}
Expand description
A trait for querying the peer ID and connectivity of the local node.
Required Methods§
sourcefn local_peer_id(&self) -> PeerId
fn local_peer_id(&self) -> PeerId
Returns the peer ID of the local node.
sourcefn is_connected(&self, peer_id: &PeerId) -> bool
fn is_connected(&self, peer_id: &PeerId) -> bool
Returns true
iff the local node is currently connected to the specified peer.