[−][src]Trait libp2p_core::upgrade::OutboundUpgrade
Possible upgrade on an outbound connection or substream.
Associated Types
type Output
Output after the upgrade has been successfully negotiated and the handshake performed.
type Error
Possible error during the handshake.
type Future: Future<Item = Self::Output, Error = Self::Error>
Future that performs the handshake with the remote.
Required methods
fn upgrade_outbound(self, socket: C, info: Self::Info) -> Self::Future
After 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> OutboundUpgrade<C> for DeniedUpgrade
[src]
impl<C> OutboundUpgrade<C> for DeniedUpgrade
type Output = Void
type Error = Void
type Future = Empty<Self::Output, Self::Error>
fn upgrade_outbound(self, _: C, _: Self::Info) -> Self::Future | [src] |
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>,
[src]
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>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<A::Future, B::Future>
fn upgrade_outbound(self, sock: C, info: Self::Info) -> Self::Future | [src] |
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>,
[src]
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>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<A::Future, B::Future>
fn upgrade_outbound(self, sock: C, info: Self::Info) -> Self::Future | [src] |
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
[src]
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
type Output = U::Output
type Error = U::Error
type Future = U::Future
fn upgrade_outbound(self, sock: C, info: Self::Info) -> Self::Future | [src] |
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
[src]
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
type Output = U::Output
type Error = U::Error
type Future = U::Future
fn upgrade_outbound(self, sock: C, info: Self::Info) -> Self::Future | [src] |
impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Output) -> T,
[src]
impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Output) -> T,
type Output = T
type Error = U::Error
type Future = MapFuture<U::Future, F>
fn upgrade_outbound(self, sock: C, info: Self::Info) -> Self::Future | [src] |
impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Error) -> T,
[src]
impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
F: FnOnce(U::Error) -> T,