pub trait EventSubscriber: Send + Sync {
// Required method
fn handle_event(&self, event: HttpEvent) -> BoxFuture<'_, ()>;
}Expand description
Event subscriber trait for TAP HTTP events
Note: This trait is not object-safe because of the async fn. For dynamic dispatch, we use a type-erased wrapper.
Required Methods§
Sourcefn handle_event(&self, event: HttpEvent) -> BoxFuture<'_, ()>
fn handle_event(&self, event: HttpEvent) -> BoxFuture<'_, ()>
Handle an HTTP event
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T> EventSubscriber for T
Implementation for async handlers