Trait DatagramSenderExt
pub trait DatagramSenderExt: DatagramSender + DatagramSenderExtSealed {
// Provided methods
fn send<'a>(
&'a mut self,
datagram: SendDatagram<'a>,
) -> impl Future<Output = Result<(), DatagramError>> + Send + 'a
where Self: Sized { ... }
fn send_batch<'a>(
&'a mut self,
datagrams: &'a [SendDatagram<'a>],
) -> impl Future<Output = Result<usize, DatagramError>> + Send + 'a
where Self: Sized { ... }
}Available on crate features
std and udp only.Expand description
Async convenience methods for DatagramSender.
Provided Methods§
fn send<'a>(
&'a mut self,
datagram: SendDatagram<'a>,
) -> impl Future<Output = Result<(), DatagramError>> + Send + 'awhere
Self: Sized,
fn send<'a>(
&'a mut self,
datagram: SendDatagram<'a>,
) -> impl Future<Output = Result<(), DatagramError>> + Send + 'awhere
Self: Sized,
Send one descriptor.
fn send_batch<'a>(
&'a mut self,
datagrams: &'a [SendDatagram<'a>],
) -> impl Future<Output = Result<usize, DatagramError>> + Send + 'awhere
Self: Sized,
fn send_batch<'a>(
&'a mut self,
datagrams: &'a [SendDatagram<'a>],
) -> impl Future<Output = Result<usize, DatagramError>> + Send + 'awhere
Self: Sized,
Send a batch, returning the accepted prefix length.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".