Skip to main content

TypedSyncMiddleware

Trait TypedSyncMiddleware 

Source
pub trait TypedSyncMiddleware<E: Event>:
    Send
    + Sync
    + 'static {
    // Required method
    fn process(&self, event_name: &'static str, event: &E) -> MiddlewareDecision;
}
Expand description

Sync middleware scoped to a specific event type E.

This middleware runs only when publishing events of type E.

Required Methods§

Source

fn process(&self, event_name: &'static str, event: &E) -> MiddlewareDecision

Inspect a typed event and decide whether to continue or reject.

Implementors§