Trait sc_network::service::traits::NetworkStateInfo

source ·
pub trait NetworkStateInfo {
    // Required methods
    fn external_addresses(&self) -> Vec<Multiaddr>;
    fn listen_addresses(&self) -> Vec<Multiaddr>;
    fn local_peer_id(&self) -> PeerId;
}
Expand description

Trait for providing information about the local network state

Required Methods§

source

fn external_addresses(&self) -> Vec<Multiaddr>

Returns the local external addresses.

source

fn listen_addresses(&self) -> Vec<Multiaddr>

Returns the listening addresses (without trailing /p2p/ with our PeerId).

source

fn local_peer_id(&self) -> PeerId

Returns the local Peer ID.

Implementations on Foreign Types§

source§

impl<T> NetworkStateInfo for Arc<T>
where T: ?Sized + NetworkStateInfo,

Implementors§

source§

impl<B, H> NetworkStateInfo for NetworkService<B, H>
where B: Block, H: ExHashT,