pub trait UdpSend: ErrorType {
// Required method
async fn send(
&mut self,
remote: SocketAddr,
data: &[u8],
) -> Result<(), Self::Error>;
}Expand description
Re-export the edge-nal crate
This trait is implemented by UDP sockets and models their datagram sending functionality.
The socket it represents might be either bound (has a local IP address, port and interface) or connected (also has a remote IP address and port).
The term “connected” here refers to the semantics of POSIX datagram sockets, through which datagrams
are sent and received without having a remote address per call. It does not imply any process
of establishing a connection (which is absent in UDP). While there is typically no POSIX
bind() call in the creation of such sockets, these are implicitly bound to a suitable local
address at connect time.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".