pub trait UpgradeInfo {
    type Info: AsRef<str> + Clone;
    type InfoIter: IntoIterator<Item = Self::Info>;

    // Required method
    fn protocol_info(&self) -> Self::InfoIter;
}
Expand description

Common trait for upgrades that can be applied on inbound substreams, outbound substreams, or both.

Required Associated Types§

source

type Info: AsRef<str> + Clone

Opaque type representing a negotiable protocol.

source

type InfoIter: IntoIterator<Item = Self::Info>

Iterator returned by protocol_info.

Required Methods§

source

fn protocol_info(&self) -> Self::InfoIter

Returns the list of protocols that are supported. Used during the negotiation process.

Implementations on Foreign Types§

source§

impl<A, B> UpgradeInfo for Either<A, B>
where A: UpgradeInfo, B: UpgradeInfo,

Implementors§

source§

impl UpgradeInfo for FloodsubProtocol

source§

impl UpgradeInfo for FloodsubRpc

source§

impl UpgradeInfo for libp2p::noise::Config

§

type Info = &'static str

§

type InfoIter = Once<<Config as UpgradeInfo>::Info>

source§

impl UpgradeInfo for libp2p::plaintext::Config

§

type Info = &'static str

§

type InfoIter = Once<<Config as UpgradeInfo>::Info>

source§

impl UpgradeInfo for libp2p::tls::Config

§

type Info = &'static str

§

type InfoIter = Once<<Config as UpgradeInfo>::Info>

source§

impl UpgradeInfo for libp2p::yamux::Config

§

type Info = &'static str

§

type InfoIter = Once<<Config as UpgradeInfo>::Info>

source§

impl UpgradeInfo for DeniedUpgrade

§

type Info = &'static str

§

type InfoIter = Empty<<DeniedUpgrade as UpgradeInfo>::Info>

source§

impl<A, B> UpgradeInfo for SelectUpgrade<A, B>
where A: UpgradeInfo, B: UpgradeInfo,

source§

impl<P> UpgradeInfo for PendingUpgrade<P>
where P: AsRef<str> + Clone,

§

type Info = P

§

type InfoIter = Once<P>

source§

impl<P> UpgradeInfo for ReadyUpgrade<P>
where P: AsRef<str> + Clone,

§

type Info = P

§

type InfoIter = Once<P>

source§

impl<T> UpgradeInfo for SendWrapper<T>
where T: UpgradeInfoSend,