pub trait Listener {
type Stream: ByteStream;
// Required method
fn poll_accept(
&self,
cx: &mut Context<'_>,
) -> Poll<Result<(Self::Stream, SocketAddr)>>;
}Available on crate feature
connection only.Required Associated Types§
type Stream: ByteStream
Required Methods§
fn poll_accept( &self, cx: &mut Context<'_>, ) -> Poll<Result<(Self::Stream, SocketAddr)>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Listener for TcpListener
impl Listener for TcpListener
Source§impl Listener for UnixListener
Available on Unix only.
impl Listener for UnixListener
Available on Unix only.