Skip to main content

MessageCallback

Type Alias MessageCallback 

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

Optional callback invoked for each message received from the CLI.

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

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

Aliased Typeยง

pub struct MessageCallback { /* private fields */ }