[][src]Trait mssql_browser::custom_socket::UdpSocketFactory

pub trait UdpSocketFactory: Sized {
    type Socket: UdpSocket;
    type Error: Error;
#[must_use]    fn bind<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        addr: &'life1 SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<Self::Socket, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

A trait used to create UdpSocket instances.

Associated Types

Loading content...

Required methods

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

Creates a UDP socket from the given address.

Loading content...

Implementors

impl UdpSocketFactory for AsyncStdSocketFactory[src]

type Error = Error

type Socket = UdpSocket

impl UdpSocketFactory for TokioSocketFactory[src]

type Error = Error

type Socket = UdpSocket

Loading content...