Trait libp2p_core::upgrade::OutboundUpgrade [−][src]
pub trait OutboundUpgrade<C>: UpgradeInfo { type Output; type Error; type Future: Future<Output = Result<Self::Output, Self::Error>>; fn upgrade_outbound(self, socket: C, info: Self::Info) -> Self::Future; }
Expand description
Possible upgrade on an outbound connection or substream.
Associated Types
Output after the upgrade has been successfully negotiated and the handshake performed.
Required methods
fn upgrade_outbound(self, socket: C, info: Self::Info) -> Self::Future
fn upgrade_outbound(self, socket: C, info: Self::Info) -> Self::FutureAfter we have determined that the remote supports one of the protocols we support, this method is called to start the handshake.
The info is the identifier of the protocol, as produced by protocol_info.
Implementors
impl<C, A, B, TA, TB, EA, EB> OutboundUpgrade<C> for EitherUpgrade<A, B> where
A: OutboundUpgrade<C, Output = TA, Error = EA>,
B: OutboundUpgrade<C, Output = TB, Error = EB>, impl<C, A, B, TA, TB, EA, EB> OutboundUpgrade<C> for SelectUpgrade<A, B> where
A: OutboundUpgrade<C, Output = TA, Error = EA>,
B: OutboundUpgrade<C, Output = TB, Error = EB>, impl<C, P, F, Fut, Err, Out> OutboundUpgrade<C> for FromFnUpgrade<P, F> where
P: ProtocolName + Clone,
F: FnOnce(C, Endpoint) -> Fut,
Fut: Future<Output = Result<Out, Err>>, impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Output) -> T, impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Error) -> T,