Trait libp2p_swarm::PollParameters[][src]

pub trait PollParameters {
    type SupportedProtocolsIter: ExactSizeIterator<Item = Vec<u8>>;
    type ListenedAddressesIter: ExactSizeIterator<Item = Multiaddr>;
    type ExternalAddressesIter: ExactSizeIterator<Item = Multiaddr>;
    fn supported_protocols(&self) -> Self::SupportedProtocolsIter;
fn listened_addresses(&self) -> Self::ListenedAddressesIter;
fn external_addresses(&self) -> Self::ExternalAddressesIter;
fn local_peer_id(&self) -> &PeerId; }

Parameters passed to poll(), that the NetworkBehaviour has access to.

Associated Types

type SupportedProtocolsIter: ExactSizeIterator<Item = Vec<u8>>[src]

Iterator returned by supported_protocols.

type ListenedAddressesIter: ExactSizeIterator<Item = Multiaddr>[src]

Iterator returned by listened_addresses.

type ExternalAddressesIter: ExactSizeIterator<Item = Multiaddr>[src]

Iterator returned by external_addresses.

Loading content...

Required methods

fn supported_protocols(&self) -> Self::SupportedProtocolsIter[src]

Returns the list of protocol the behaviour supports when a remote negotiates a protocol on an inbound substream.

The iterator’s elements are the ASCII names as reported on the wire.

Note that the list is computed once at initialization and never refreshed.

fn listened_addresses(&self) -> Self::ListenedAddressesIter[src]

Returns the list of the addresses we’re listening on.

fn external_addresses(&self) -> Self::ExternalAddressesIter[src]

Returns the list of the addresses nodes can use to reach us.

fn local_peer_id(&self) -> &PeerId[src]

Returns the peer id of the local node.

Loading content...

Implementors

impl<'a> PollParameters for SwarmPollParameters<'a>[src]

Loading content...