pub trait Listener: Send + Sync {
    type Output;

    // Required method
    fn accept<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Represents a type that has a listen interface for receiving raw streams

Required Associated Types§

Required Methods§

source

fn accept<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl Listener for TcpListener

source§

impl Listener for UnixSocketListener

source§

impl<L, F, T, U> Listener for MappedListener<L, F, T, U>where L: Listener<Output = T>, F: FnMut(T) -> U + Send + Sync,

§

type Output = U

source§

impl<T: Send> Listener for MpscListener<T>

§

type Output = T

source§

impl<T: Send> Listener for OneshotListener<T>

§

type Output = T