Skip to main content

EventFailureReporter

Trait EventFailureReporter 

Source
pub trait EventFailureReporter:
    Send
    + Sync
    + 'static {
    // Required method
    fn report(
        &self,
        failure: EventHandlerFailure,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

Observes failures from generated asynchronous event-handler dispatch.

A reporter is configured with event_failure_reporter: in mediator!. It is awaited once for each failed handler, but reporting never prevents dispatch to later handlers. The returned future must be Send so the same reporter works with Tokio workers; async fn implementations satisfy this when their future is Send.

Required Methods§

Source

fn report( &self, failure: EventHandlerFailure, ) -> impl Future<Output = ()> + Send

Observe one failed event-handler invocation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§