Skip to main content

Handler

Trait Handler 

Source
pub trait Handler<Msg: Message + Send + Sync>
where Msg::Result: Send + Sync,
{ // Required method fn handle<'life0, 'life1, 'async_trait>( &'life0 mut self, message: Msg, ctx: &'life1 mut ActorHandlerContext, ) -> Pin<Box<dyn Future<Output = Msg::Result> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; }

Required Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( &'life0 mut self, message: Msg, ctx: &'life1 mut ActorHandlerContext, ) -> Pin<Box<dyn Future<Output = Msg::Result> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl Handler<DeregisterActor> for ActorScheduler

Source§

impl<A> Handler<Status> for A
where A: 'static + Actor + Sync + Send,

Source§

impl<A> Handler<Stop> for A
where A: 'static + Sync + Send + Actor,

Source§

impl<A> Handler<GetActor<A>> for ActorScheduler
where A: 'static + Sync + Send + Actor,

Source§

impl<A> Handler<RegisterActor<A>> for ActorScheduler
where A: 'static + Sync + Send + Actor,

Source§

impl<F, A, R> Handler<Exec<F, A, R>> for A
where A: 'static + Actor + Sync + Send, F: FnMut(&mut A) -> R + 'static + Send + Sync, R: 'static + Send + Sync,

Source§

impl<W, M> Handler<WorkerMessage<M>> for Worker<W>
where W: 'static + Sync + Send + Handler<M> + Actor, M: 'static + Sync + Send + Message, M::Result: 'static + Sync + Send,