Trait libp2p_core::upgrade::InboundUpgrade [−][src]
Possible upgrade on an inbound connection or substream.
Associated Types
type Output
[src]
Output after the upgrade has been successfully negotiated and the handshake performed.
type Error
[src]
Possible error during the handshake.
type Future: Future<Output = Result<Self::Output, Self::Error>>
[src]
Future that performs the handshake with the remote.
Required methods
fn upgrade_inbound(self, socket: C, info: Self::Info) -> Self::Future
[src]
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> InboundUpgrade<C> for DeniedUpgrade
[src]
type Output = Void
type Error = Void
type Future = Pending<Result<Self::Output, Self::Error>>
fn upgrade_inbound(self, _: C, _: Self::Info) -> Self::Future
[src]
impl<C, A, B, TA, TB, EA, EB> InboundUpgrade<C> for EitherUpgrade<A, B> where
A: InboundUpgrade<C, Output = TA, Error = EA>,
B: InboundUpgrade<C, Output = TB, Error = EB>,
[src]
A: InboundUpgrade<C, Output = TA, Error = EA>,
B: InboundUpgrade<C, Output = TB, Error = EB>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<A::Future, B::Future>
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, A, B, TA, TB, EA, EB> InboundUpgrade<C> for SelectUpgrade<A, B> where
A: InboundUpgrade<C, Output = TA, Error = EA>,
B: InboundUpgrade<C, Output = TB, Error = EB>,
[src]
A: InboundUpgrade<C, Output = TA, Error = EA>,
B: InboundUpgrade<C, Output = TB, Error = EB>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<A::Future, B::Future>
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, P, F, Fut, Err, Out> InboundUpgrade<C> for FromFnUpgrade<P, F> where
P: ProtocolName + Clone,
F: FnOnce(C, Endpoint) -> Fut,
Fut: Future<Output = Result<Out, Err>>,
[src]
P: ProtocolName + Clone,
F: FnOnce(C, Endpoint) -> Fut,
Fut: Future<Output = Result<Out, Err>>,
type Output = Out
type Error = Err
type Future = Fut
fn upgrade_inbound(self, sock: C, _: Self::Info) -> Self::Future
[src]
impl<C, T> InboundUpgrade<C> for OptionalUpgrade<T> where
T: InboundUpgrade<C>,
[src]
T: InboundUpgrade<C>,
type Output = T::Output
type Error = T::Error
type Future = T::Future
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: InboundUpgrade<C>,
[src]
U: InboundUpgrade<C>,
type Output = U::Output
type Error = U::Error
type Future = U::Future
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: InboundUpgrade<C>,
[src]
U: InboundUpgrade<C>,
type Output = U::Output
type Error = U::Error
type Future = U::Future
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgrade<U, F> where
U: InboundUpgrade<C>,
F: FnOnce(U::Output) -> T,
[src]
U: InboundUpgrade<C>,
F: FnOnce(U::Output) -> T,
type Output = T
type Error = U::Error
type Future = MapFuture<U::Future, F>
fn upgrade_inbound(self, sock: C, info: Self::Info) -> Self::Future
[src]
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
U: InboundUpgrade<C>,
F: FnOnce(U::Error) -> T,
[src]
U: InboundUpgrade<C>,
F: FnOnce(U::Error) -> T,