[][src]Trait libp2p::OutboundUpgrade

pub trait OutboundUpgrade<C>: UpgradeInfo where
    <Self::Future as Future>::Item == Self::Output,
    <Self::Future as Future>::Error == Self::Error
{ type Output; type Error; type Future: Future; fn upgrade_outbound(
        self,
        socket: Negotiated<C>,
        info: Self::Info
    ) -> Self::Future; }

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

Future that performs the handshake with the remote.

Loading content...

Required methods

fn upgrade_outbound(
    self,
    socket: Negotiated<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> OutboundUpgrade<C> for DeniedUpgrade[src]

impl<C> OutboundUpgrade<C> for DeflateConfig where
    C: AsyncRead + AsyncWrite
[src]

impl<C> OutboundUpgrade<C> for IdentifyProtocolConfig where
    C: AsyncRead + AsyncWrite
[src]

impl<C> OutboundUpgrade<C> for KademliaProtocolConfig where
    C: AsyncRead + AsyncWrite
[src]

impl<C> OutboundUpgrade<C> for MplexConfig where
    C: AsyncRead + AsyncWrite
[src]

impl<C> OutboundUpgrade<C> for PlainTextConfig[src]

impl<C> OutboundUpgrade<C> for Config where
    C: AsyncRead + AsyncWrite + 'static, 
[src]

type Output = Yamux<Negotiated<C>>

type Error = Error

type Future = FutureResult<Yamux<Negotiated<C>>, Error>

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]

type Output = EitherOutput<TA, TB>

type Error = EitherError<EA, EB>

type Future = EitherFuture2<<A as OutboundUpgrade<C>>::Future, <B as OutboundUpgrade<C>>::Future>

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]

type Output = EitherOutput<TA, TB>

type Error = EitherError<EA, EB>

type Future = EitherFuture2<<A as OutboundUpgrade<C>>::Future, <B as OutboundUpgrade<C>>::Future>

impl<C, F, O> OutboundUpgrade<C> for SimpleProtocol<F> where
    C: AsyncRead + AsyncWrite,
    F: Fn(Negotiated<C>) -> O,
    O: IntoFuture<Error = IoError>, 
[src]

type Output = O::Item

type Error = IoError

type Future = FromErr<O::Future, IoError>

impl<C, T> OutboundUpgrade<C> for OptionalUpgrade<T> where
    T: OutboundUpgrade<C>, 
[src]

type Output = <T as OutboundUpgrade<C>>::Output

type Error = <T as OutboundUpgrade<C>>::Error

type Future = <T as OutboundUpgrade<C>>::Future

impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgrade<U, F> where
    U: OutboundUpgrade<C>, 
[src]

type Output = <U as OutboundUpgrade<C>>::Output

type Error = <U as OutboundUpgrade<C>>::Error

type Future = <U as OutboundUpgrade<C>>::Future

impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
    U: OutboundUpgrade<C>, 
[src]

type Output = <U as OutboundUpgrade<C>>::Output

type Error = <U as OutboundUpgrade<C>>::Error

type Future = <U as OutboundUpgrade<C>>::Future

impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgrade<U, F> where
    F: FnOnce(<U as OutboundUpgrade<C>>::Output) -> T,
    U: OutboundUpgrade<C>, 
[src]

type Output = T

type Error = <U as OutboundUpgrade<C>>::Error

type Future = MapFuture<<U as OutboundUpgrade<C>>::Future, F>

impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
    F: FnOnce(<U as OutboundUpgrade<C>>::Error) -> T,
    U: OutboundUpgrade<C>, 
[src]

type Output = <U as OutboundUpgrade<C>>::Output

type Error = T

type Future = MapErrFuture<<U as OutboundUpgrade<C>>::Future, F>

impl<T> OutboundUpgrade<T> for SecioConfig where
    T: AsyncRead + AsyncWrite + Send + 'static, 
[src]

type Output = SecioOutput<Negotiated<T>>

type Error = SecioError

type Future = Box<dyn Future<Item = <SecioConfig as OutboundUpgrade<T>>::Output, Error = <SecioConfig as OutboundUpgrade<T>>::Error> + 'static + Send>

impl<T, C> OutboundUpgrade<T> for NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> where
    C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
    T: AsyncRead + AsyncWrite + Send + 'static,
    NoiseConfig<IK, C, (PublicKey<C>, PublicKey)>: UpgradeInfo
[src]

impl<T, C> OutboundUpgrade<T> for NoiseConfig<IX, C, ()> where
    C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
    T: AsyncRead + AsyncWrite + Send + 'static,
    NoiseConfig<IX, C, ()>: UpgradeInfo
[src]

type Output = (RemoteIdentity<C>, NoiseOutput<Negotiated<T>>)

type Error = NoiseError

type Future = Handshake<Negotiated<T>, C>

impl<T, C> OutboundUpgrade<T> for NoiseConfig<XX, C, ()> where
    C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
    T: AsyncRead + AsyncWrite + Send + 'static,
    NoiseConfig<XX, C, ()>: UpgradeInfo
[src]

type Output = (RemoteIdentity<C>, NoiseOutput<Negotiated<T>>)

type Error = NoiseError

type Future = Handshake<Negotiated<T>, C>

impl<TSocket> OutboundUpgrade<TSocket> for FloodsubRpc where
    TSocket: AsyncWrite + AsyncRead
[src]

type Output = ()

type Error = Error

type Future = WriteOne<Negotiated<TSocket>, Vec<u8>>

impl<TSocket> OutboundUpgrade<TSocket> for Ping where
    TSocket: AsyncRead + AsyncWrite
[src]

type Output = Duration

type Error = Error

type Future = PingDialer<Negotiated<TSocket>>

Loading content...