libp2p::swarm::handler

Trait UpgradeInfoSend

pub trait UpgradeInfoSend: Send + 'static {
    type Info: AsRef<str> + Clone + Send + 'static;
    type InfoIter: Iterator<Item = Self::Info> + Send + 'static;

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

Implemented automatically on all types that implement UpgradeInfo and Send + 'static.

Do not implement this trait yourself. Instead, please implement UpgradeInfo.

Required Associated Types§

type Info: AsRef<str> + Clone + Send + 'static

Equivalent to UpgradeInfo::Info.

type InfoIter: Iterator<Item = Self::Info> + Send + 'static

Equivalent to UpgradeInfo::InfoIter.

Required Methods§

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

Implementors§

§

impl<K, H> UpgradeInfoSend for Upgrade<K, H>
where H: UpgradeInfoSend, K: Send + 'static,

§

impl<T> UpgradeInfoSend for T
where T: UpgradeInfo + Send + 'static, <T as UpgradeInfo>::Info: Send + 'static, <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,