Trait Listener

Source
pub trait Listener {
    type Stream: ByteStream;

    // Required method
    fn poll_accept(
        &self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(Self::Stream, SocketAddr)>>;
}

Required Associated Types§

Required Methods§

Source

fn poll_accept( &self, cx: &mut Context<'_>, ) -> Poll<Result<(Self::Stream, SocketAddr)>>

Implementations on Foreign Types§

Source§

impl Listener for TcpListener

Source§

type Stream = TcpStream

Source§

fn poll_accept( &self, cx: &mut Context<'_>, ) -> Poll<Result<(Self::Stream, SocketAddr)>>

Source§

impl Listener for UnixListener

Source§

type Stream = UnixStream

Source§

fn poll_accept( &self, cx: &mut Context<'_>, ) -> Poll<Result<(Self::Stream, SocketAddr)>>

Implementors§