pub trait TriggerHandler<Ctx, Evt>: Send + Sync {
// Required methods
fn events(&self) -> Vec<Evt>;
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn priority(&self) -> i32 { ... }
fn continue_on_error(&self) -> bool { ... }
}Expand description
Generic lifecycle trigger handler.
Ctx— entity-specific trigger context (e.g.TriggerContext<Order>)Evt— trigger event type (e.g.TriggerEvent)
Required Methods§
Provided Methods§
Sourcefn continue_on_error(&self) -> bool
fn continue_on_error(&self) -> bool
Whether to keep dispatching after this handler errors. Default: false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".