[][src]Trait libp2p_core::upgrade::InboundUpgrade

pub trait InboundUpgrade<C>: UpgradeInfo {
    type Output;
    type Error;
    type Future: Future<Item = Self::Output, Error = Self::Error>;
    fn upgrade_inbound(self, socket: C, info: Self::Info) -> Self::Future;
}

Possible upgrade on an inbound 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.

Loading content...

Required methods

fn upgrade_inbound(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.

Loading content...

Implementors

impl<C> InboundUpgrade<C> for DeniedUpgrade
[src]

type Output = Void

type Error = Void

type Future = Empty<Self::Output, Self::Error>

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]

type Output = EitherOutput<TA, TB>

type Error = EitherError<EA, EB>

type Future = EitherFuture2<A::Future, B::Future>

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]

type Output = EitherOutput<TA, TB>

type Error = EitherError<EA, EB>

type Future = EitherFuture2<A::Future, B::Future>

impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgrade<U, F> where
    U: InboundUpgrade<C>, 
[src]

type Output = U::Output

type Error = U::Error

type Future = U::Future

impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
    U: InboundUpgrade<C>, 
[src]

type Output = U::Output

type Error = U::Error

type Future = U::Future

impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgrade<U, F> where
    U: InboundUpgrade<C>,
    F: FnOnce(U::Output) -> T, 
[src]

type Output = T

type Error = U::Error

type Future = MapFuture<U::Future, F>

impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
    U: InboundUpgrade<C>,
    F: FnOnce(U::Error) -> T, 
[src]

type Output = U::Output

type Error = T

type Future = MapErrFuture<U::Future, F>

Loading content...