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