Trait tor_rtcompat::UdpProvider
source · pub trait UdpProvider: Clone + Send + Sync + 'static {
type UdpSocket: UdpSocket + Send + Sync + Unpin + 'static;
fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = IoResult<Self::UdpSocket>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for a runtime that can send and receive UDP datagrams.
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
source§impl UdpProvider for AsyncStd
Available on (crate features native-tls or rustls) and (crate features async-std or tokio) and crate feature async-std only.
impl UdpProvider for AsyncStd
Available on (crate features
native-tls or rustls) and (crate features async-std or tokio) and crate feature async-std only.Implementors§
source§impl UdpProvider for AsyncStdNativeTlsRuntime
Available on (crate features native-tls or rustls) and crate feature async-std only.
impl UdpProvider for AsyncStdNativeTlsRuntime
Available on (crate features
native-tls or rustls) and crate feature async-std only.type UdpSocket = <CompoundRuntime<AsyncStd, AsyncStd, AsyncStd, NativeTlsProvider, AsyncStd> as UdpProvider>::UdpSocket
source§impl UdpProvider for AsyncStdRustlsRuntime
Available on (crate features native-tls or rustls) and crate feature async-std only.
impl UdpProvider for AsyncStdRustlsRuntime
Available on (crate features
native-tls or rustls) and crate feature async-std only.type UdpSocket = <CompoundRuntime<AsyncStd, AsyncStd, AsyncStd, RustlsProvider, AsyncStd> as UdpProvider>::UdpSocket
source§impl UdpProvider for PreferredRuntime
impl UdpProvider for PreferredRuntime
type UdpSocket = <TokioNativeTlsRuntime as UdpProvider>::UdpSocket
source§impl UdpProvider for TokioNativeTlsRuntime
Available on (crate features native-tls or rustls) and crate feature tokio only.
impl UdpProvider for TokioNativeTlsRuntime
Available on (crate features
native-tls or rustls) and crate feature tokio only.type UdpSocket = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, TokioRuntimeHandle, NativeTlsProvider, TokioRuntimeHandle> as UdpProvider>::UdpSocket
source§impl UdpProvider for TokioRustlsRuntime
Available on (crate features native-tls or rustls) and crate feature tokio only.
impl UdpProvider for TokioRustlsRuntime
Available on (crate features
native-tls or rustls) and crate feature tokio only.