BaseListenerAsync

Trait BaseListenerAsync 

Source
pub trait BaseListenerAsync: Send + Sync {
    // Required methods
    fn start<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &'static str;
}
Expand description

Trait for async listeners (HTTP, SSE, async stdio, etc)

Required Methods§

Source

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

Start the listener (async)

Source

fn name(&self) -> &'static str

Listener name/type

Implementors§