Trait WorkerPoolAsyncInf

Source
pub trait WorkerPoolAsyncInf<M: Send + Sized + Unpin + 'static>: Send + Sync {
    // Required methods
    fn submit<'life0, 'async_trait>(
        &'life0 self,
        msg: M,
    ) -> Pin<Box<dyn Future<Output = Option<M>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn try_submit(&self, msg: M) -> Option<M>;
}

Required Methods§

Source

fn submit<'life0, 'async_trait>( &'life0 self, msg: M, ) -> Pin<Box<dyn Future<Output = Option<M>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn try_submit(&self, msg: M) -> Option<M>

Implementors§

Source§

impl<M, W, S> WorkerPoolAsyncInf<M> for WorkerPoolBounded<M, W, S>
where M: Send + Sized + Unpin + 'static, W: Worker<M>, S: WorkerPoolImpl<M, W>,