Struct libp2p_webrtc::WebRtcTransport
source · [−]pub struct WebRtcTransport { /* private fields */ }
Implementations
Trait Implementations
sourceimpl Clone for WebRtcTransport
impl Clone for WebRtcTransport
sourcefn clone(&self) -> WebRtcTransport
fn clone(&self) -> WebRtcTransport
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Transport for WebRtcTransport
impl Transport for WebRtcTransport
type Output = DataStream
type Output = DataStream
The result of a connection setup process, including protocol upgrades. Read more
type Listener = BoxStream<'static, Result<ListenerEvent<Self::ListenerUpgrade, Self::Error>, Self::Error>>
type Listener = BoxStream<'static, Result<ListenerEvent<Self::ListenerUpgrade, Self::Error>, Self::Error>>
type ListenerUpgrade = BoxFuture<'static, Result<Self::Output, Self::Error>>
type ListenerUpgrade = BoxFuture<'static, Result<Self::Output, Self::Error>>
sourcefn listen_on(
self,
addr: Multiaddr
) -> Result<Self::Listener, TransportError<Self::Error>> where
Self: Sized,
fn listen_on(
self,
addr: Multiaddr
) -> Result<Self::Listener, TransportError<Self::Error>> where
Self: Sized,
Listens on the given [Multiaddr
], producing a stream of pending, inbound connections
and addresses this transport is listening on (cf. [ListenerEvent
]). Read more
sourcefn dial(
self,
addr: Multiaddr
) -> Result<Self::Dial, TransportError<Self::Error>> where
Self: Sized,
fn dial(
self,
addr: Multiaddr
) -> Result<Self::Dial, TransportError<Self::Error>> where
Self: Sized,
Dials the given [Multiaddr
], returning a future for a pending outbound connection. Read more
sourcefn address_translation(
&self,
_listen: &Multiaddr,
_observed: &Multiaddr
) -> Option<Multiaddr>
fn address_translation(
&self,
_listen: &Multiaddr,
_observed: &Multiaddr
) -> Option<Multiaddr>
Performs a transport-specific mapping of an address observed
by
a remote onto a local listen
address to yield an address for
the local node that may be reachable for other peers. Read more
sourcefn dial_as_listener(
self,
addr: Multiaddr
) -> Result<<Self as Transport>::Dial, TransportError<<Self as Transport>::Error>>
fn dial_as_listener(
self,
addr: Multiaddr
) -> Result<<Self as Transport>::Dial, TransportError<<Self as Transport>::Error>>
As [Transport::dial
] but has the local node act as a listener on the outgoing connection. Read more
fn boxed(self) -> Boxed<Self::Output> where
Self: 'static + Transport + Clone + Send + Sync,
Self::Dial: 'static,
Self::Dial: Send,
Self::Listener: 'static,
Self::Listener: Send,
Self::ListenerUpgrade: 'static,
Self::ListenerUpgrade: Send,
Self::Error: Send,
Self::Error: Sync,
fn boxed(self) -> Boxed<Self::Output> where
Self: 'static + Transport + Clone + Send + Sync,
Self::Dial: 'static,
Self::Dial: Send,
Self::Listener: 'static,
Self::Listener: Send,
Self::ListenerUpgrade: 'static,
Self::ListenerUpgrade: Send,
Self::Error: Send,
Self::Error: Sync,
Boxes the transport, including custom transport errors.
fn map<F, O>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output, ConnectedPoint) -> O + Clone,
fn map<F, O>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output, ConnectedPoint) -> O + Clone,
Applies a function on the connections created by the transport.
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E + Clone,
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E + Clone,
Applies a function on the errors generated by the futures of the transport.
fn or_transport<U>(self, other: U) -> OrTransport<Self, U> where
U: Transport,
<U as Transport>::Error: 'static,
fn or_transport<U>(self, other: U) -> OrTransport<Self, U> where
U: Transport,
<U as Transport>::Error: 'static,
Adds a fallback transport that is used when encountering errors while establishing inbound or outbound connections. Read more
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: 'static,
<F as TryFuture>::Error: Error,
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: 'static,
<F as TryFuture>::Error: Error,
Applies a function producing an asynchronous result to every connection created by this transport. Read more
fn upgrade(self, version: Version) -> Builder<Self> where
Self::Error: 'static,
fn upgrade(self, version: Version) -> Builder<Self> where
Self::Error: 'static,
Begins a series of protocol upgrades via an
upgrade::Builder
. Read more
Auto Trait Implementations
impl RefUnwindSafe for WebRtcTransport
impl Send for WebRtcTransport
impl Sync for WebRtcTransport
impl Unpin for WebRtcTransport
impl UnwindSafe for WebRtcTransport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<TTransport> TransportExt for TTransport where
TTransport: Transport,
impl<TTransport> TransportExt for TTransport where
TTransport: Transport,
sourcefn with_bandwidth_logging(self) -> (BandwidthLogging<Self>, Arc<BandwidthSinks>)
fn with_bandwidth_logging(self) -> (BandwidthLogging<Self>, Arc<BandwidthSinks>)
Adds a layer on the Transport
that logs all trafic that passes through the sockets
created by it. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more