Skip to main content

Acceptor

Trait Acceptor 

Source
pub trait Acceptor: Send {
    type Connection: Connection;

    // Required method
    fn accept(&self) -> impl Future<Output = Result<Self::Connection>> + Send;
}
Available on crate feature server only.
Expand description

Connection acceptor.

Required Associated Types§

Required Methods§

Source

fn accept(&self) -> impl Future<Output = Result<Self::Connection>> + Send

Accept a new connection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Acceptor for TcpListener

Implementors§