[−][src]Trait libp2p::InboundUpgrade
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
Future that performs the handshake with the remote.
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
.
Implementors
impl<C> InboundUpgrade<C> for DeniedUpgrade
[src]
impl<C> InboundUpgrade<C> for DeniedUpgrade
type Output = Void
type Error = Void
type Future = Empty<<DeniedUpgrade as InboundUpgrade<C>>::Output, <DeniedUpgrade as InboundUpgrade<C>>::Error>
fn upgrade_inbound( | [src] |
impl<C> InboundUpgrade<C> for IdentifyProtocolConfig where
C: AsyncRead + AsyncWrite,
[src]
impl<C> InboundUpgrade<C> for IdentifyProtocolConfig where
C: AsyncRead + AsyncWrite,
type Output = IdentifySender<C>
type Error = Error
type Future = FutureResult<<IdentifyProtocolConfig as InboundUpgrade<C>>::Output, Error>
fn upgrade_inbound( | [src] |
impl<C> InboundUpgrade<C> for KademliaProtocolConfig where
C: AsyncRead + AsyncWrite,
[src]
impl<C> InboundUpgrade<C> for KademliaProtocolConfig where
C: AsyncRead + AsyncWrite,
type Output = AndThen<With<FromErr<Framed<C, UviBytes<Vec<u8>>>, Error>, KadResponseMsg, fn(KadResponseMsg) -> Result<Vec<u8>, Error>, Result<Vec<u8>, Error>>, fn(BytesMut) -> Result<KadRequestMsg, Error>, Result<KadRequestMsg, Error>>
type Future = FutureResult<<KademliaProtocolConfig as InboundUpgrade<C>>::Output, Error>
type Error = Error
fn upgrade_inbound( | [src] |
impl<C> InboundUpgrade<C> for MplexConfig where
C: AsyncRead + AsyncWrite,
[src]
impl<C> InboundUpgrade<C> for MplexConfig where
C: AsyncRead + AsyncWrite,
type Output = Multiplex<C>
type Error = Error
type Future = FutureResult<<MplexConfig as InboundUpgrade<C>>::Output, Error>
fn upgrade_inbound( | [src] |
impl<C> InboundUpgrade<C> for PlainTextConfig
[src]
impl<C> InboundUpgrade<C> for PlainTextConfig
type Output = C
type Error = Void
type Future = FutureResult<C, <PlainTextConfig as InboundUpgrade<C>>::Error>
fn upgrade_inbound( | [src] |
impl<C> InboundUpgrade<C> for Config where
C: AsyncRead + AsyncWrite + 'static,
[src]
impl<C> InboundUpgrade<C> for Config where
C: AsyncRead + AsyncWrite + 'static,
type Output = Yamux<C>
type Error = Error
type Future = FutureResult<Yamux<C>, Error>
fn upgrade_inbound( | [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]
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>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<<A as InboundUpgrade<C>>::Future, <B as InboundUpgrade<C>>::Future>
fn upgrade_inbound( | [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]
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>,
type Output = EitherOutput<TA, TB>
type Error = EitherError<EA, EB>
type Future = EitherFuture2<<A as InboundUpgrade<C>>::Future, <B as InboundUpgrade<C>>::Future>
fn upgrade_inbound( | [src] |
impl<C, F, O> InboundUpgrade<C> for SimpleProtocol<F> where
C: AsyncRead + AsyncWrite,
F: Fn(C) -> O,
O: IntoFuture<Error = IoError>,
[src]
impl<C, F, O> InboundUpgrade<C> for SimpleProtocol<F> where
C: AsyncRead + AsyncWrite,
F: Fn(C) -> O,
O: IntoFuture<Error = IoError>,
type Output = O::Item
type Error = IoError
type Future = FromErr<O::Future, IoError>
fn upgrade_inbound(self, socket: C, _: Self::Info) -> Self::Future | [src] |
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: InboundUpgrade<C>,
[src]
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgrade<U, F> where
U: InboundUpgrade<C>,
type Output = <U as InboundUpgrade<C>>::Output
type Error = <U as InboundUpgrade<C>>::Error
type Future = <U as InboundUpgrade<C>>::Future
fn upgrade_inbound( | [src] |
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: InboundUpgrade<C>,
[src]
impl<C, U, F> InboundUpgrade<C> for MapOutboundUpgradeErr<U, F> where
U: InboundUpgrade<C>,
type Output = <U as InboundUpgrade<C>>::Output
type Error = <U as InboundUpgrade<C>>::Error
type Future = <U as InboundUpgrade<C>>::Future
fn upgrade_inbound( | [src] |
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgrade<U, F> where
F: FnOnce(<U as InboundUpgrade<C>>::Output) -> T,
U: InboundUpgrade<C>,
[src]
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgrade<U, F> where
F: FnOnce(<U as InboundUpgrade<C>>::Output) -> T,
U: InboundUpgrade<C>,
type Output = T
type Error = <U as InboundUpgrade<C>>::Error
type Future = MapFuture<<U as InboundUpgrade<C>>::Future, F>
fn upgrade_inbound( | [src] |
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
F: FnOnce(<U as InboundUpgrade<C>>::Error) -> T,
U: InboundUpgrade<C>,
[src]
impl<C, U, F, T> InboundUpgrade<C> for MapInboundUpgradeErr<U, F> where
F: FnOnce(<U as InboundUpgrade<C>>::Error) -> T,
U: InboundUpgrade<C>,
type Output = <U as InboundUpgrade<C>>::Output
type Error = T
type Future = MapErrFuture<<U as InboundUpgrade<C>>::Future, F>
fn upgrade_inbound( | [src] |
impl<T> InboundUpgrade<T> for SecioConfig where
T: AsyncRead + AsyncWrite + Send + 'static,
[src]
impl<T> InboundUpgrade<T> for SecioConfig where
T: AsyncRead + AsyncWrite + Send + 'static,
type Output = SecioOutput<T>
type Error = SecioError
type Future = Box<dyn Future<Item = <SecioConfig as InboundUpgrade<T>>::Output, Error = <SecioConfig as InboundUpgrade<T>>::Error> + 'static + Send>
fn upgrade_inbound( | [src] |
impl<TSocket> InboundUpgrade<TSocket> for FloodsubConfig where
TSocket: AsyncRead + AsyncWrite,
[src]
impl<TSocket> InboundUpgrade<TSocket> for FloodsubConfig where
TSocket: AsyncRead + AsyncWrite,
type Output = Framed<TSocket, FloodsubCodec>
type Error = Error
type Future = FutureResult<<FloodsubConfig as InboundUpgrade<TSocket>>::Output, <FloodsubConfig as InboundUpgrade<TSocket>>::Error>
fn upgrade_inbound( | [src] |
impl<TSocket, TUserData> InboundUpgrade<TSocket> for Ping<TUserData> where
TSocket: AsyncRead + AsyncWrite,
[src]
impl<TSocket, TUserData> InboundUpgrade<TSocket> for Ping<TUserData> where
TSocket: AsyncRead + AsyncWrite,
type Output = PingListener<TSocket>
type Error = Error
type Future = FutureResult<<Ping<TUserData> as InboundUpgrade<TSocket>>::Output, <Ping<TUserData> as InboundUpgrade<TSocket>>::Error>
fn upgrade_inbound( | [src] |