pub trait Accept: Send + Sync + 'static {
    type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static;

    // Required method
    fn accept<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(Self::Stream, String)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

source

type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static

Required Methods§

source

fn accept<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(Self::Stream, String)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl Accept for TcpListener

§

type Stream = TcpStream

source§

fn accept<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(Self::Stream, String)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§