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.

Implementations on Foreign Types§

Source§

impl<A> Accept for TlsAcceptor<A>
where A: Accept<Error = Error> + Unpin, <A as Accept>::Conn: AsyncRead + AsyncWrite + Unpin,

Source§

type Conn = TlsStream<<A as Accept>::Conn>

Source§

type Error = Error

Source§

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

Implementors§