pub trait PacketIO:
Send
+ Sync
+ 'static {
// Required methods
fn send_to(
&self,
buf: &[u8],
target: SocketAddr,
) -> impl Future<Output = Result<usize>> + Sync + Send;
fn recv_from(
&self,
buf: &mut [u8],
) -> impl Future<Output = Result<(usize, SocketAddr)>> + Sync + Send;
}Required Methods§
fn send_to( &self, buf: &[u8], target: SocketAddr, ) -> impl Future<Output = Result<usize>> + Sync + Send
fn recv_from( &self, buf: &mut [u8], ) -> impl Future<Output = Result<(usize, SocketAddr)>> + Sync + Send
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.