pub trait BreakerCheck: Send + Sync {
// Required method
fn is_open<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Per-tool circuit-breaker snapshot. The router calls this for every
candidate during IntentRouter::resolve; tools whose breaker is
Open are excluded from scoring so a recently-failing tool can’t be
chosen until the cooldown elapses. The concrete breaker lives in
brainos-resilience; the trait keeps the schema crate independent
of the resilience layer.
Required Methods§
fn is_open<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".