logo
pub trait OutboundUpgrade<C>: UpgradeInfo {
    type Output;
    type Error;
    type Future: Future;
    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.

Possible error during the handshake.

Future that performs the handshake with the remote.

Required methods

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 DeflateConfig where
    C: AsyncRead + AsyncWrite

impl<TSocket> OutboundUpgrade<TSocket> for FloodsubRpc where
    TSocket: AsyncWrite + AsyncRead + Send + Unpin + 'static, 

impl<TSocket> OutboundUpgrade<TSocket> for ProtocolConfig where
    TSocket: AsyncWrite + AsyncRead + Unpin + Send + 'static, 

impl<C> OutboundUpgrade<C> for KademliaProtocolConfig where
    C: AsyncRead + AsyncWrite + Unpin

impl<C> OutboundUpgrade<C> for MplexConfig where
    C: AsyncRead + AsyncWrite + Unpin

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

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

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

impl<T, P, C, R> OutboundUpgrade<T> for NoiseAuthenticated<P, C, R> where
    NoiseConfig<P, C, R>: UpgradeInfo + OutboundUpgrade<T, Output = (RemoteIdentity<C>, NoiseOutput<T>), Error = NoiseError> + 'static,
    <NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Future: Send,
    T: AsyncRead + AsyncWrite + Send + 'static,
    C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static, 

impl<C> OutboundUpgrade<C> for PlainText2Config where
    C: AsyncRead + AsyncWrite + Send + Unpin + 'static, 

impl<TCodec> OutboundUpgrade<Negotiated<SubstreamRef<Arc<StreamMuxerBox>>>> for RequestProtocol<TCodec> where
    TCodec: RequestResponseCodec + Send + 'static, 

impl<C> OutboundUpgrade<C> for YamuxConfig where
    C: AsyncRead + AsyncWrite + Send + Unpin + 'static, 

impl<C> OutboundUpgrade<C> for YamuxLocalConfig where
    C: AsyncRead + AsyncWrite + Unpin + 'static,