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§

source

fn local_peer_id(&self) -> PeerId

Returns the peer ID of the local node.

source

fn is_connected(&self, peer_id: &PeerId) -> bool

Returns true iff the local node is currently connected to the specified peer.

Implementors§