libp2p::swarm::handler

Trait OutboundUpgradeSend

pub trait OutboundUpgradeSend: UpgradeInfoSend {
    type Output: Send + 'static;
    type Error: Send + 'static;
    type Future: Future<Output = Result<Self::Output, Self::Error>> + Send + 'static;

    // Required method
    fn upgrade_outbound(self, socket: Stream, info: Self::Info) -> Self::Future;
}
Expand description

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

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

Required Associated Types§

type Output: Send + 'static

Equivalent to OutboundUpgrade::Output.

type Error: Send + 'static

Equivalent to OutboundUpgrade::Error.

type Future: Future<Output = Result<Self::Output, Self::Error>> + Send + 'static

Equivalent to OutboundUpgrade::Future.

Required Methods§

fn upgrade_outbound(self, socket: Stream, info: Self::Info) -> Self::Future

Implementors§

§

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

§

type Output = (K, <H as OutboundUpgradeSend>::Output)

§

type Error = (K, <H as OutboundUpgradeSend>::Error)

§

type Future = Pin<Box<dyn Future<Output = Result<<Upgrade<K, H> as OutboundUpgradeSend>::Output, <Upgrade<K, H> as OutboundUpgradeSend>::Error>> + Send>>

§

impl<T, TInfo> OutboundUpgradeSend for T
where T: OutboundUpgrade<Stream, Info = TInfo> + UpgradeInfoSend<Info = TInfo>, TInfo: AsRef<str> + Clone + Send + 'static, <T as OutboundUpgrade<Stream>>::Output: Send + 'static, <T as OutboundUpgrade<Stream>>::Error: Send + 'static, <T as OutboundUpgrade<Stream>>::Future: Send + 'static,