Skip to main content

UpgradeInfo

Trait 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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 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>

Source§

impl UpgradeInfo for libp2p::tls::Config

§

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 UpgradeInfo for FloodsubProtocol

§

impl UpgradeInfo for FloodsubRpc

§

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,