Skip to main content

EventCallback

Type Alias EventCallback 

Source
pub type EventCallback = Arc<dyn Fn(ThreadEvent) -> Option<ThreadEvent> + Send + Sync>;
Expand description

Optional callback invoked for each event received from the CLI.

  • Return Some(event) to pass the event through (possibly transformed).
  • Return None to filter the event out of the stream.

When no callback is configured, all events pass through unchanged.

Aliased Typeยง

pub struct EventCallback { /* private fields */ }