Trait libp2p::swarm::PollParameters [−][src]
pub trait PollParameters {
type SupportedProtocolsIter: ExactSizeIterator;
type ListenedAddressesIter: ExactSizeIterator;
type ExternalAddressesIter: ExactSizeIterator;
fn supported_protocols(&self) -> Self::SupportedProtocolsIter;
fn listened_addresses(&self) -> Self::ListenedAddressesIter;
fn external_addresses(&self) -> Self::ExternalAddressesIter;
fn local_peer_id(&self) -> &PeerId;
}Expand description
Parameters passed to poll(), that the NetworkBehaviour has access to.
Associated Types
Iterator returned by supported_protocols.
Iterator returned by listened_addresses.
Iterator returned by external_addresses.
Required methods
fn supported_protocols(&self) -> Self::SupportedProtocolsIter[src]
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]
fn listened_addresses(&self) -> Self::ListenedAddressesIter[src]Returns the list of the addresses we’re listening on.
fn external_addresses(&self) -> Self::ExternalAddressesIter[src]
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]
fn local_peer_id(&self) -> &PeerId[src]Returns the peer id of the local node.
Implementors
type ListenedAddressesIter = IntoIter<Multiaddr, Global>type ExternalAddressesIter = AddressIntoIterpub fn supported_protocols(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::SupportedProtocolsIter[src]pub fn listened_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ListenedAddressesIter[src]pub fn external_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ExternalAddressesIter[src]