[][src]Trait izanami::server::conn::Acceptor

pub trait Acceptor<T> {
    type Accepted: AsyncRead + AsyncWrite;
    fn accept(&self, io: T) -> Self::Accepted;
}

A trait that represents the conversion of asynchronous I/Os.

Typically, the implementors of this trait establish a TLS session.

Associated Types

Loading content...

Required methods

fn accept(&self, io: T) -> Self::Accepted

Converts the supplied I/O object into an Accepted.

The returned I/O from this method includes the handshake process, and the process will be executed by reading/writing the I/O.

Loading content...

Implementations on Foreign Types

impl<T> Acceptor<T> for () where
    T: AsyncRead + AsyncWrite
[src]

type Accepted = T

Loading content...

Implementors

impl<F, T, U> Acceptor<T> for F where
    F: Fn(T) -> U,
    U: AsyncRead + AsyncWrite
[src]

type Accepted = U

Loading content...