Struct libp2p::swarm::SwarmPollParameters
source · [−]pub struct SwarmPollParameters<'a> { /* private fields */ }
Expand description
Parameters passed to poll()
, that the NetworkBehaviour
has access to.
Trait Implementations
sourceimpl<'a> PollParameters for SwarmPollParameters<'a>
impl<'a> PollParameters for SwarmPollParameters<'a>
type SupportedProtocolsIter = IntoIter<Vec<u8, Global>, Global>
type SupportedProtocolsIter = IntoIter<Vec<u8, Global>, Global>
Iterator returned by supported_protocols
.
type ListenedAddressesIter = IntoIter<Multiaddr, Global>
type ListenedAddressesIter = IntoIter<Multiaddr, Global>
Iterator returned by listened_addresses
.
type ExternalAddressesIter = AddressIntoIter
type ExternalAddressesIter = AddressIntoIter
Iterator returned by external_addresses
.
sourcepub fn supported_protocols(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::SupportedProtocolsIter
pub fn supported_protocols(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::SupportedProtocolsIter
Returns the list of protocol the behaviour supports when a remote negotiates a protocol on an inbound substream. Read more
sourcepub fn listened_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ListenedAddressesIter
pub fn listened_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ListenedAddressesIter
Returns the list of the addresses we’re listening on.
sourcepub fn external_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ExternalAddressesIter
pub fn external_addresses(
&self
) -> <SwarmPollParameters<'a> as PollParameters>::ExternalAddressesIter
Returns the list of the addresses nodes can use to reach us.
sourcepub fn local_peer_id(&self) -> &PeerId
pub fn local_peer_id(&self) -> &PeerId
Returns the peer id of the local node.
Auto Trait Implementations
impl<'a> RefUnwindSafe for SwarmPollParameters<'a>
impl<'a> Send for SwarmPollParameters<'a>
impl<'a> Sync for SwarmPollParameters<'a>
impl<'a> Unpin for SwarmPollParameters<'a>
impl<'a> UnwindSafe for SwarmPollParameters<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more