pub trait ToolRegistryApi:
ToolSecurity
+ PtySessionControl
+ McpBridge
+ ToolResilience
+ ToolCatalog
+ ToolMetrics
+ Send
+ Sync
+ 'static { }Expand description
Full tool registry API: the union of all subsystem traits.
Use this as a bound when a consumer needs access to the complete registry
surface. For narrower needs, prefer the individual traits
(ToolCatalog, ToolSecurity, etc.) to reduce coupling.
§Migration Guide
Current code passes Arc<ToolRegistry> or &ToolRegistry directly.
To migrate a consumer to the trait-based interface:
- Replace
Arc<ToolRegistry>withArc<dyn ToolRegistryApi>. - Replace
&ToolRegistrywith&dyn ToolRegistryApi. - The consumer can now be tested with a mock that implements only the traits it actually uses.
ToolRegistry implements this supertrait automatically.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T> ToolRegistryApi for Twhere
T: ToolSecurity + PtySessionControl + McpBridge + ToolResilience + ToolCatalog + ToolMetrics + Send + Sync + 'static,
Blanket impl: any type that implements all subsystem traits gets
ToolRegistryApi for free.