pub trait TypedMiddleware<E: Event>:
Send
+ Sync
+ 'static {
// Required method
fn process<'a>(
&'a self,
event_name: &'static str,
event: &'a E,
) -> impl Future<Output = MiddlewareDecision> + Send + 'a;
}Expand description
Async middleware scoped to a specific event type E.
This middleware runs only when publishing events of type E.
Required Methods§
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.