[−][src]Trait libp2p::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: Unpin + Future
Future that performs the handshake with the remote.
Required methods
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<C>>>,
info: Self::Info
) -> Self::Future
self,
socket: Compat01As03<Negotiated<Compat<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]
type Output = Void
type Error = Void
type Future = Pending<Result<<DeniedUpgrade as OutboundUpgrade<C>>::Output, <DeniedUpgrade as OutboundUpgrade<C>>::Error>>
fn upgrade_outbound(
self,
Compat01As03<Negotiated<Compat<C>>>,
<DeniedUpgrade as UpgradeInfo>::Info
) -> <DeniedUpgrade as OutboundUpgrade<C>>::Future
[src]
self,
Compat01As03<Negotiated<Compat<C>>>,
<DeniedUpgrade as UpgradeInfo>::Info
) -> <DeniedUpgrade as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for DeflateConfig where
C: AsyncRead + AsyncWrite,
[src]
C: AsyncRead + AsyncWrite,
type Output = DeflateOutput<Compat01As03<Negotiated<Compat<C>>>>
type Error = Error
type Future = Ready<Result<<DeflateConfig as OutboundUpgrade<C>>::Output, <DeflateConfig as OutboundUpgrade<C>>::Error>>
fn upgrade_outbound(
self,
w: Compat01As03<Negotiated<Compat<C>>>,
<DeflateConfig as UpgradeInfo>::Info
) -> <DeflateConfig as OutboundUpgrade<C>>::Future
[src]
self,
w: Compat01As03<Negotiated<Compat<C>>>,
<DeflateConfig as UpgradeInfo>::Info
) -> <DeflateConfig as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for KademliaProtocolConfig where
C: AsyncRead + AsyncWrite + Unpin,
[src]
C: AsyncRead + AsyncWrite + Unpin,
type Output = AndThen<With<ErrInto<Framed<Compat01As03<Negotiated<Compat<C>>>, UviBytes<Cursor<Vec<u8>>>>, Error>, Cursor<Vec<u8>>, KadRequestMsg, Ready<Result<Cursor<Vec<u8>>, Error>>, fn(KadRequestMsg) -> Ready<Result<Cursor<Vec<u8>>, Error>>>, Ready<Result<KadResponseMsg, Error>>, fn(BytesMut) -> Ready<Result<KadResponseMsg, Error>>>
type Future = Ready<Result<<KademliaProtocolConfig as OutboundUpgrade<C>>::Output, Error>>
type Error = Error
fn upgrade_outbound(
self,
incoming: Compat01As03<Negotiated<Compat<C>>>,
<KademliaProtocolConfig as UpgradeInfo>::Info
) -> <KademliaProtocolConfig as OutboundUpgrade<C>>::Future
[src]
self,
incoming: Compat01As03<Negotiated<Compat<C>>>,
<KademliaProtocolConfig as UpgradeInfo>::Info
) -> <KademliaProtocolConfig as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for MplexConfig where
C: AsyncRead + AsyncWrite + Unpin,
[src]
C: AsyncRead + AsyncWrite + Unpin,
type Output = Multiplex<Compat01As03<Negotiated<Compat<C>>>>
type Error = Error
type Future = Ready<Result<<MplexConfig as OutboundUpgrade<C>>::Output, Error>>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<C>>>,
<MplexConfig as UpgradeInfo>::Info
) -> <MplexConfig as OutboundUpgrade<C>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<C>>>,
<MplexConfig as UpgradeInfo>::Info
) -> <MplexConfig as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for PlainText1Config
[src]
type Output = Compat01As03<Negotiated<Compat<C>>>
type Error = Void
type Future = Ready<Result<Compat01As03<Negotiated<Compat<C>>>, <PlainText1Config as OutboundUpgrade<C>>::Error>>
fn upgrade_outbound(
self,
i: Compat01As03<Negotiated<Compat<C>>>,
<PlainText1Config as UpgradeInfo>::Info
) -> <PlainText1Config as OutboundUpgrade<C>>::Future
[src]
self,
i: Compat01As03<Negotiated<Compat<C>>>,
<PlainText1Config as UpgradeInfo>::Info
) -> <PlainText1Config as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for PlainText2Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static,
[src]
C: AsyncRead + AsyncWrite + Send + Unpin + 'static,
type Output = (PeerId, PlainTextOutput<Compat01As03<Negotiated<Compat<C>>>>)
type Error = PlainTextError
type Future = Pin<Box<dyn Future<Output = Result<<PlainText2Config as OutboundUpgrade<C>>::Output, <PlainText2Config as OutboundUpgrade<C>>::Error>> + 'static + Send>>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<C>>>,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as OutboundUpgrade<C>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<C>>>,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static,
[src]
C: AsyncRead + AsyncWrite + Send + Unpin + 'static,
type Output = Yamux<Incoming<Compat01As03<Negotiated<Compat<C>>>>>
type Error = Error
type Future = Ready<Result<<Config as OutboundUpgrade<C>>::Output, <Config as OutboundUpgrade<C>>::Error>>
fn upgrade_outbound(
self,
io: Compat01As03<Negotiated<Compat<C>>>,
<Config as UpgradeInfo>::Info
) -> <Config as OutboundUpgrade<C>>::Future
[src]
self,
io: Compat01As03<Negotiated<Compat<C>>>,
<Config as UpgradeInfo>::Info
) -> <Config as OutboundUpgrade<C>>::Future
impl<C> OutboundUpgrade<C> for LocalConfig where
C: AsyncRead + AsyncWrite + Unpin + 'static,
[src]
C: AsyncRead + AsyncWrite + Unpin + 'static,
type Output = Yamux<LocalIncoming<Compat01As03<Negotiated<Compat<C>>>>>
type Error = Error
type Future = Ready<Result<<LocalConfig as OutboundUpgrade<C>>::Output, <LocalConfig as OutboundUpgrade<C>>::Error>>
fn upgrade_outbound(
self,
io: Compat01As03<Negotiated<Compat<C>>>,
<LocalConfig as UpgradeInfo>::Info
) -> <LocalConfig as OutboundUpgrade<C>>::Future
[src]
self,
io: Compat01As03<Negotiated<Compat<C>>>,
<LocalConfig as UpgradeInfo>::Info
) -> <LocalConfig as OutboundUpgrade<C>>::Future
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]
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 as OutboundUpgrade<C>>::Future, <B as OutboundUpgrade<C>>::Future>
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <EitherUpgrade<A, B> as UpgradeInfo>::Info
) -> <EitherUpgrade<A, B> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <EitherUpgrade<A, B> as UpgradeInfo>::Info
) -> <EitherUpgrade<A, 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]
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 as OutboundUpgrade<C>>::Future, <B as OutboundUpgrade<C>>::Future>
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <SelectUpgrade<A, B> as UpgradeInfo>::Info
) -> <SelectUpgrade<A, B> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <SelectUpgrade<A, B> as UpgradeInfo>::Info
) -> <SelectUpgrade<A, B> as OutboundUpgrade<C>>::Future
impl<C, F, O, A, E> OutboundUpgrade<C> for SimpleProtocol<F> where
C: AsyncRead + AsyncWrite,
F: Fn(Negotiated<C>) -> O,
O: Future<Output = Result<A, E>> + Unpin,
[src]
C: AsyncRead + AsyncWrite,
F: Fn(Negotiated<C>) -> O,
O: Future<Output = Result<A, E>> + Unpin,
type Output = A
type Error = E
type Future = O
fn upgrade_outbound(self, socket: Negotiated<C>, _: Self::Info) -> Self::Future
[src]
impl<C, T> OutboundUpgrade<C> for OptionalUpgrade<T> where
T: OutboundUpgrade<C>,
[src]
T: OutboundUpgrade<C>,
type Output = <T as OutboundUpgrade<C>>::Output
type Error = <T as OutboundUpgrade<C>>::Error
type Future = <T as OutboundUpgrade<C>>::Future
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <OptionalUpgrade<T> as UpgradeInfo>::Info
) -> <OptionalUpgrade<T> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <OptionalUpgrade<T> as UpgradeInfo>::Info
) -> <OptionalUpgrade<T> as OutboundUpgrade<C>>::Future
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgrade<U, F> where
U: OutboundUpgrade<C>,
[src]
U: OutboundUpgrade<C>,
type Output = <U as OutboundUpgrade<C>>::Output
type Error = <U as OutboundUpgrade<C>>::Error
type Future = <U as OutboundUpgrade<C>>::Future
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapInboundUpgrade<U, F> as UpgradeInfo>::Info
) -> <MapInboundUpgrade<U, F> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapInboundUpgrade<U, F> as UpgradeInfo>::Info
) -> <MapInboundUpgrade<U, F> as OutboundUpgrade<C>>::Future
impl<C, U, F> OutboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
U: OutboundUpgrade<C>,
[src]
U: OutboundUpgrade<C>,
type Output = <U as OutboundUpgrade<C>>::Output
type Error = <U as OutboundUpgrade<C>>::Error
type Future = <U as OutboundUpgrade<C>>::Future
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapInboundUpgradeErr<U, F> as UpgradeInfo>::Info
) -> <MapInboundUpgradeErr<U, F> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapInboundUpgradeErr<U, F> as UpgradeInfo>::Info
) -> <MapInboundUpgradeErr<U, F> 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]
F: FnOnce(<U as OutboundUpgrade<C>>::Output) -> T,
U: OutboundUpgrade<C>,
type Output = T
type Error = <U as OutboundUpgrade<C>>::Error
type Future = MapFuture<<U as OutboundUpgrade<C>>::Future, F>
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapOutboundUpgrade<U, F> as UpgradeInfo>::Info
) -> <MapOutboundUpgrade<U, F> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapOutboundUpgrade<U, F> as UpgradeInfo>::Info
) -> <MapOutboundUpgrade<U, F> as OutboundUpgrade<C>>::Future
impl<C, U, F, T> OutboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
F: FnOnce(<U as OutboundUpgrade<C>>::Error) -> T,
U: OutboundUpgrade<C>,
[src]
F: FnOnce(<U as OutboundUpgrade<C>>::Error) -> T,
U: OutboundUpgrade<C>,
type Output = <U as OutboundUpgrade<C>>::Output
type Error = T
type Future = MapErrFuture<<U as OutboundUpgrade<C>>::Future, F>
fn upgrade_outbound(
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapOutboundUpgradeErr<U, F> as UpgradeInfo>::Info
) -> <MapOutboundUpgradeErr<U, F> as OutboundUpgrade<C>>::Future
[src]
self,
sock: Compat01As03<Negotiated<Compat<C>>>,
info: <MapOutboundUpgradeErr<U, F> as UpgradeInfo>::Info
) -> <MapOutboundUpgradeErr<U, F> as OutboundUpgrade<C>>::Future
impl<T> OutboundUpgrade<T> for SecioConfig where
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
[src]
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
type Output = (PeerId, SecioOutput<Compat01As03<Negotiated<Compat<T>>>>)
type Error = SecioError
type Future = Pin<Box<dyn Future<Output = Result<<SecioConfig as OutboundUpgrade<T>>::Output, <SecioConfig as OutboundUpgrade<T>>::Error>> + 'static + Send>>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<SecioConfig as UpgradeInfo>::Info
) -> <SecioConfig as OutboundUpgrade<T>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<SecioConfig as UpgradeInfo>::Info
) -> <SecioConfig as OutboundUpgrade<T>>::Future
impl<T, C> OutboundUpgrade<T> for NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> where
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<IK, C, (PublicKey<C>, PublicKey)>: UpgradeInfo,
[src]
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<IK, C, (PublicKey<C>, PublicKey)>: UpgradeInfo,
type Output = (RemoteIdentity<C>, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>)
type Error = NoiseError
type Future = Handshake<Compat01As03<Negotiated<Compat<T>>>, C>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> as UpgradeInfo>::Info
) -> <NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> as OutboundUpgrade<T>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> as UpgradeInfo>::Info
) -> <NoiseConfig<IK, C, (PublicKey<C>, PublicKey)> as OutboundUpgrade<T>>::Future
impl<T, C> OutboundUpgrade<T> for NoiseConfig<IX, C, ()> where
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<IX, C, ()>: UpgradeInfo,
[src]
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<IX, C, ()>: UpgradeInfo,
type Output = (RemoteIdentity<C>, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>)
type Error = NoiseError
type Future = Handshake<Compat01As03<Negotiated<Compat<T>>>, C>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<IX, C, ()> as UpgradeInfo>::Info
) -> <NoiseConfig<IX, C, ()> as OutboundUpgrade<T>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<IX, C, ()> as UpgradeInfo>::Info
) -> <NoiseConfig<IX, C, ()> as OutboundUpgrade<T>>::Future
impl<T, C> OutboundUpgrade<T> for NoiseConfig<XX, C, ()> where
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<XX, C, ()>: UpgradeInfo,
[src]
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
NoiseConfig<XX, C, ()>: UpgradeInfo,
type Output = (RemoteIdentity<C>, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>)
type Error = NoiseError
type Future = Handshake<Compat01As03<Negotiated<Compat<T>>>, C>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<XX, C, ()> as UpgradeInfo>::Info
) -> <NoiseConfig<XX, C, ()> as OutboundUpgrade<T>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
<NoiseConfig<XX, C, ()> as UpgradeInfo>::Info
) -> <NoiseConfig<XX, C, ()> as OutboundUpgrade<T>>::Future
impl<T, P, C, R> OutboundUpgrade<T> for NoiseAuthenticated<P, C, R> where
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Send + 'static,
NoiseConfig<P, C, R>: UpgradeInfo,
NoiseConfig<P, C, R>: OutboundUpgrade<T>,
NoiseConfig<P, C, R>: 'static,
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Future: Send,
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Output == (RemoteIdentity<C>, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>),
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Error == NoiseError,
[src]
C: Protocol<C> + AsRef<[u8]> + Zeroize + Send + 'static,
T: AsyncRead + AsyncWrite + Send + 'static,
NoiseConfig<P, C, R>: UpgradeInfo,
NoiseConfig<P, C, R>: OutboundUpgrade<T>,
NoiseConfig<P, C, R>: 'static,
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Future: Send,
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Output == (RemoteIdentity<C>, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>),
<NoiseConfig<P, C, R> as OutboundUpgrade<T>>::Error == NoiseError,
type Output = (PeerId, NoiseOutput<Compat01As03<Negotiated<Compat<T>>>>)
type Error = NoiseError
type Future = Pin<Box<dyn Future<Output = Result<<NoiseAuthenticated<P, C, R> as OutboundUpgrade<T>>::Output, <NoiseAuthenticated<P, C, R> as OutboundUpgrade<T>>::Error>> + 'static + Send>>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
info: <NoiseAuthenticated<P, C, R> as UpgradeInfo>::Info
) -> <NoiseAuthenticated<P, C, R> as OutboundUpgrade<T>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<T>>>,
info: <NoiseAuthenticated<P, C, R> as UpgradeInfo>::Info
) -> <NoiseAuthenticated<P, C, R> as OutboundUpgrade<T>>::Future
impl<TSocket> OutboundUpgrade<TSocket> for FloodsubRpc where
TSocket: AsyncWrite + AsyncRead + Send + Unpin + 'static,
[src]
TSocket: AsyncWrite + AsyncRead + Send + Unpin + 'static,
type Output = ()
type Error = Error
type Future = Pin<Box<dyn Future<Output = Result<<FloodsubRpc as OutboundUpgrade<TSocket>>::Output, <FloodsubRpc as OutboundUpgrade<TSocket>>::Error>> + 'static + Send>>
fn upgrade_outbound(
self,
socket: Compat01As03<Negotiated<Compat<TSocket>>>,
<FloodsubRpc as UpgradeInfo>::Info
) -> <FloodsubRpc as OutboundUpgrade<TSocket>>::Future
[src]
self,
socket: Compat01As03<Negotiated<Compat<TSocket>>>,
<FloodsubRpc as UpgradeInfo>::Info
) -> <FloodsubRpc as OutboundUpgrade<TSocket>>::Future
impl<TSocket> OutboundUpgrade<TSocket> for Ping where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
[src]
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,