pub trait Acceptor: Clone + Sync + Send + Unpin + 'static {
    type Stream<T: Stream>: Stream;
    type Accept<T: Stream>: Future<Output = Result<Self::Stream<T>, Error>> + Unpin;

    // Required method
    fn accept<T: Stream>(&self, stream: T) -> Self::Accept<T>;
}

Required Associated Types§

source

type Stream<T: Stream>: Stream

source

type Accept<T: Stream>: Future<Output = Result<Self::Stream<T>, Error>> + Unpin

Required Methods§

source

fn accept<T: Stream>(&self, stream: T) -> Self::Accept<T>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Acceptor for TlsAcceptor

§

type Stream<T: Stream> = TlsStream<T>

§

type Accept<T: Stream> = Accept<T>

source§

fn accept<T: Stream>(&self, stream: T) -> Self::Accept<T>

Implementors§

source§

impl Acceptor for RawAcceptor

§

type Stream<T: Stream> = T

§

type Accept<T: Stream> = Ready<Result<T, Error>>

source§

impl<T: Acceptor> Acceptor for MaybeAcceptor<T>

§

type Stream<U: Stream> = MaybeStream<<T as Acceptor>::Stream<U>, U>

§

type Accept<U: Stream> = MaybeAccept<T, U>