hyper::server::accept

Trait Accept

Source
pub trait Accept {
    type Conn;
    type Error;

    // Required method
    fn poll_accept(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<Option<Result<Self::Conn, Self::Error>>>;
}
Expand description

Asynchronously accept incoming connections.

Required Associated Types§

Source

type Conn

The connection type that can be accepted.

Source

type Error

The error type that can occur when accepting a connection.

Required Methods§

Source

fn poll_accept( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Conn, Self::Error>>>

Poll to accept the next connection.

Implementors§