Struct libp2p::core::transport::and_then::AndThen [−][src]
pub struct AndThen<T, C> { /* fields omitted */ }
See the Transport::and_then
method.
Trait Implementations
impl<T, C, F, O> Transport for AndThen<T, C> where
C: FnOnce(<T as Transport>::Output, ConnectedPoint) -> F + Clone,
F: TryFuture<Ok = O>,
T: Transport,
<F as TryFuture>::Error: Error,
[src]
impl<T, C, F, O> Transport for AndThen<T, C> where
C: FnOnce(<T as Transport>::Output, ConnectedPoint) -> F + Clone,
F: TryFuture<Ok = O>,
T: Transport,
<F as TryFuture>::Error: Error,
[src]type Output = O
The result of a connection setup process, including protocol upgrades. Read more
type Error = EitherError<<T as Transport>::Error, <F as TryFuture>::Error>
An error that occurred during connection setup.
type Listener = AndThenStream<<T as Transport>::Listener, C>
type ListenerUpgrade = AndThenFuture<<T as Transport>::ListenerUpgrade, C, F>
type Dial = AndThenFuture<<T as Transport>::Dial, C, F>
pub fn listen_on(
self,
addr: Multiaddr
) -> Result<<AndThen<T, C> as Transport>::Listener, TransportError<<AndThen<T, C> as Transport>::Error>>
[src]
self,
addr: Multiaddr
) -> Result<<AndThen<T, C> as Transport>::Listener, TransportError<<AndThen<T, C> as Transport>::Error>>
pub fn dial(
self,
addr: Multiaddr
) -> Result<<AndThen<T, C> as Transport>::Dial, TransportError<<AndThen<T, C> as Transport>::Error>>
[src]
self,
addr: Multiaddr
) -> Result<<AndThen<T, C> as Transport>::Dial, TransportError<<AndThen<T, C> as Transport>::Error>>
pub fn address_translation(
&self,
server: &Multiaddr,
observed: &Multiaddr
) -> Option<Multiaddr>
[src]
&self,
server: &Multiaddr,
observed: &Multiaddr
) -> Option<Multiaddr>
pub fn boxed(self) -> Boxed<Self::Output> where
Self: Transport + Clone + Send + Sync + 'static,
Self::Dial: Send,
Self::Dial: 'static,
Self::Listener: Send,
Self::Listener: 'static,
Self::ListenerUpgrade: Send,
Self::ListenerUpgrade: 'static,
Self::Error: Send,
Self::Error: Sync,
[src]
Self: Transport + Clone + Send + Sync + 'static,
Self::Dial: Send,
Self::Dial: 'static,
Self::Listener: Send,
Self::Listener: 'static,
Self::ListenerUpgrade: Send,
Self::ListenerUpgrade: 'static,
Self::Error: Send,
Self::Error: Sync,
pub fn map<F, O>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output, ConnectedPoint) -> O + Clone,
[src]
F: FnOnce(Self::Output, ConnectedPoint) -> O + Clone,
pub fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E + Clone,
[src]
F: FnOnce(Self::Error) -> E + Clone,
pub fn or_transport<U>(self, other: U) -> OrTransport<Self, U> where
U: Transport,
<U as Transport>::Error: 'static,
[src]
U: Transport,
<U as Transport>::Error: 'static,
pub fn and_then<C, F, O>(self, f: C) -> AndThen<Self, C> where
C: FnOnce(Self::Output, ConnectedPoint) -> F + Clone,
F: TryFuture<Ok = O>,
<F as TryFuture>::Error: Error,
<F as TryFuture>::Error: 'static,
[src]
C: FnOnce(Self::Output, ConnectedPoint) -> F + Clone,
F: TryFuture<Ok = O>,
<F as TryFuture>::Error: Error,
<F as TryFuture>::Error: 'static,
pub fn upgrade(self, version: Version) -> Builder<Self> where
Self::Error: 'static,
[src]
Self::Error: 'static,
Auto Trait Implementations
impl<T, C> RefUnwindSafe for AndThen<T, C> where
C: RefUnwindSafe,
T: RefUnwindSafe,
C: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C> Send for AndThen<T, C> where
C: Send,
T: Send,
C: Send,
T: Send,
impl<T, C> Sync for AndThen<T, C> where
C: Sync,
T: Sync,
C: Sync,
T: Sync,
impl<T, C> Unpin for AndThen<T, C> where
C: Unpin,
T: Unpin,
C: Unpin,
T: Unpin,
impl<T, C> UnwindSafe for AndThen<T, C> where
C: UnwindSafe,
T: UnwindSafe,
C: UnwindSafe,
T: UnwindSafe,