pub trait UdpTransport {
type Addr: RemoteAddr;
// Required methods
fn try_recv(
&mut self,
buf: &mut [u8],
) -> Result<Option<(usize, Self::Addr)>>;
fn send_to(&mut self, buf: &[u8], addr: &Self::Addr) -> Result<usize>;
}Expand description
A non-blocking UDP transport that a SoeMultiplexer can be driven over.
Implementations should not block: try_recv returns
Ok(None) when no datagram is immediately available.
Required Associated Types§
Sourcetype Addr: RemoteAddr
type Addr: RemoteAddr
The address type identifying remote peers.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".