pub type EventHandler<S> = Arc<dyn Fn(JetstreamEvent, S) -> BoxFuture<'static, Result<()>> + Send + Sync>;Expand description
Type alias for event handler functions.
The handler receives a JetstreamEvent and a clone of whatever state
object the caller supplied to spawn_consumer. The state type must be
Clone + Send + Sync + 'static.
Aliased Typeยง
pub struct EventHandler<S> { /* private fields */ }