Trait salvo::hyper::server::accept::Accept[]

pub trait Accept {
    type Conn;
    type Error;
    fn poll_accept(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Option<Result<Self::Conn, Self::Error>>>; }
Expand description

Asynchronously accept incoming connections.

Associated Types

type Conn

Expand description

The connection type that can be accepted.

type Error

Expand description

The error type that can occur when accepting a connection.

Required methods

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

Expand description

Poll to accept the next connection.

Implementors

impl Accept for AddrIncoming

type Conn = AddrStream

type Error = Error

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