Skip to main content

WorkerRefExt

Trait WorkerRefExt 

Source
pub trait WorkerRefExt<W: Actor> {
    // Required method
    fn dispatch<'life0, 'async_trait, M>(
        &'life0 mut self,
        message: M,
    ) -> Pin<Box<dyn Future<Output = Result<M::Result, ActorRefErr>> + Send + 'async_trait>>
       where M: 'static + Send + Sync + 'async_trait + Message,
             M::Result: 'static + Send + Sync,
             W: Handler<M>,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn dispatch<'life0, 'async_trait, M>( &'life0 mut self, message: M, ) -> Pin<Box<dyn Future<Output = Result<M::Result, ActorRefErr>> + Send + 'async_trait>>
where M: 'static + Send + Sync + 'async_trait + Message, M::Result: 'static + Send + Sync, W: Handler<M>, Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W> WorkerRefExt<W> for ActorRef<Worker<W>>
where W: 'static + Clone + Sync + Send + Actor,