Trait near_async::messaging::HandlerWithContext
source · 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
Object Safety§
This trait is not object safe.