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