pub trait UdpProvider:
Clone
+ Send
+ Sync
+ 'static {
type UdpSocket: UdpSocket + Send + Sync + Unpin + 'static;
// Required method
fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = IoResult<Self::UdpSocket>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Trait for a runtime that can send and receive UDP datagrams.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
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.