pub trait AsyncAccept {
    type Connection: AsyncRead + AsyncWrite;
    type Error;
    fn poll_accept(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Option<Result<Self::Connection, Self::Error>>>; fn until<F: Future>(self, ender: F) -> Until<Self, F>
        Self: Sized
, { ... } }
Expand description

Asynchronously accept connections.

Associated Types

The type of the connection that is accepted.

The type of error that may be returned.

Required methods

Poll to accept the next connection.

Provided methods

Return a new AsyncAccept that stops accepting connections after ender completes.

Useful for graceful shutdown.

See examples/ for example of how to use.

Implementations on Foreign Types