Skip to main content

ToolEventPublisher

Trait ToolEventPublisher 

Source
pub trait ToolEventPublisher: Send + Sync {
    // Required method
    fn try_publish(
        &self,
        event: ToolEventV1,
    ) -> Result<(), ToolEventPublishError>;

    // Provided method
    fn is_enabled(&self) -> bool { ... }
}
Expand description

Non-blocking injection seam owned by one Bamboo runtime/AppState.

Implementations MUST return immediately and MUST NOT perform process I/O. Runtime routing and queues are intentionally outside this protocol slice.

Required Methods§

Provided Methods§

Source

fn is_enabled(&self) -> bool

Fast capability hint so the default no-op path performs no event DTO allocation. Implementations should keep the default true.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§