Trait AsyncSendTo

Source
pub trait AsyncSendTo {
    type Error;

    // Required method
    fn poll_send_to(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &[u8],
        addr: SocketAddr,
    ) -> Poll<Result<usize, Self::Error>>;
}
Expand description

This is intended for async datagram IO.

Required Associated Types§

Source

type Error

The associated error type.

Required Methods§

Source

fn poll_send_to( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], addr: SocketAddr, ) -> Poll<Result<usize, Self::Error>>

A non-blocking, poll-based variant of std::net::UdpSocket::send_to.

This doesn’t have to be implemented as async. The implementation for std::net::UdpSocket is blocking.

Implementations on Foreign Types§

Source§

impl AsyncSendTo for UdpSocket

Source§

type Error = Error

Source§

fn poll_send_to( self: Pin<&mut Self>, _cx: &mut Context<'_>, buf: &[u8], addr: SocketAddr, ) -> Poll<Result<usize, Error>>

Implementors§