Trait trust_dns_proto::udp::UdpSocket[][src]

pub trait UdpSocket where
    Self: Sized + Unpin
{ #[must_use] fn bind<'life0, 'async_trait>(
        addr: &'life0 SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn recv_from<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buf: &'life1 mut [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn send_to<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        buf: &'life1 [u8],
        target: &'life2 SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

Trait for UdpSocket

Required methods

#[must_use]fn bind<'life0, 'async_trait>(
    addr: &'life0 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

UdpSocket

#[must_use]fn recv_from<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Receive data from the socket and returns the number of bytes read and the address from where the data came on success.

#[must_use]fn send_to<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    buf: &'life1 [u8],
    target: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Send data to the given address.

Loading content...

Implementations on Foreign Types

impl UdpSocket for UdpSocket[src]

Loading content...

Implementors

Loading content...