Trait libp2p::swarm::behaviour::PollParameters
source · pub trait PollParameters {
type SupportedProtocolsIter: ExactSizeIterator<Item = Vec<u8>>;
// Required method
fn supported_protocols(&self) -> Self::SupportedProtocolsIter;
}
Expand description
Parameters passed to poll()
, that the NetworkBehaviour
has access to.
Required Associated Types§
sourcetype SupportedProtocolsIter: ExactSizeIterator<Item = Vec<u8>>
type SupportedProtocolsIter: ExactSizeIterator<Item = Vec<u8>>
Iterator returned by supported_protocols
.
Required Methods§
sourcefn supported_protocols(&self) -> Self::SupportedProtocolsIter
👎Deprecated: Use libp2p_swarm::SupportedProtocols
in your ConnectionHandler
instead.
fn supported_protocols(&self) -> Self::SupportedProtocolsIter
libp2p_swarm::SupportedProtocols
in your ConnectionHandler
instead.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.