pub trait HandlerWithContext<M: Message>{
// Required method
fn handle(
&mut self,
msg: M,
ctx: &mut dyn DelayedActionRunner<Self>,
) -> M::Result;
}
Expand description
Trait for handling a message with context.
This is similar to the Handler
trait, but it allows the handler to access the delayed action
runner that is used to schedule actions to be run in the future. For actix::Actor, the context
defined as actix::Context
Required Methods§
fn handle( &mut self, msg: M, ctx: &mut dyn DelayedActionRunner<Self>, ) -> M::Result
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.