ListenerStream

Trait ListenerStream 

Source
pub trait ListenerStream:
    Send
    + Sync
    + Debug
    + 'static {
    type Stream: AsyncRead + AsyncWrite + Unpin + Send + Sync;
    type Addr: Debug;

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

Required Associated Types§

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl ListenerStream for UnixListener

Source§

type Addr = SocketAddr

Source§

type Stream = UnixStream

Source§

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

Implementors§