pub trait EventHandler: Send + Sync {
// Required method
fn handle(&self, event: Event<'_>) -> Result<()>;
}Expand description
Handles converted events synchronously, applying backpressure to consumption.
Handlers run in registration order, with no interleaving across sources. An error stops consumption without acknowledging this transaction. Earlier handlers may already have produced side effects, so retries must tolerate replay. Panics also stop consumption; they do not acknowledge the event.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".