Trait libp2p::core::upgrade::UpgradeInfo

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§

type Info: AsRef<str> + Clone

Opaque type representing a negotiable protocol.

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

Iterator returned by protocol_info.

Required Methods§

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

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

Implementations on Foreign Types§

§

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

§

type Info = Either<<A as UpgradeInfo>::Info, <B as UpgradeInfo>::Info>

§

type InfoIter = Either<Map<<<A as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, fn(_: <A as UpgradeInfo>::Info) -> <Either<A, B> as UpgradeInfo>::Info>, Map<<<B as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, fn(_: <B as UpgradeInfo>::Info) -> <Either<A, B> as UpgradeInfo>::Info>>

§

fn protocol_info(&self) -> <Either<A, B> as UpgradeInfo>::InfoIter

Implementors§

§

impl UpgradeInfo for FloodsubProtocol

§

impl UpgradeInfo for FloodsubRpc

§

impl UpgradeInfo for libp2p::noise::Config

§

type Info = &'static str

§

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

§

impl UpgradeInfo for libp2p::plaintext::Config

§

type Info = &'static str

§

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

§

impl UpgradeInfo for libp2p::tls::Config

§

type Info = &'static str

§

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

§

impl UpgradeInfo for libp2p::yamux::Config

§

type Info = &'static str

§

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

§

impl UpgradeInfo for DeniedUpgrade

§

type Info = &'static str

§

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

§

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

§

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

§

type Info = P

§

type InfoIter = Once<P>

§

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

§

type Info = P

§

type InfoIter = Once<P>

§

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