Skip to main content

ToolRegistryApi

Trait ToolRegistryApi 

Source
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:

  1. Replace Arc<ToolRegistry> with Arc<dyn ToolRegistryApi>.
  2. Replace &ToolRegistry with &dyn ToolRegistryApi.
  3. 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§

Source§

impl<T> ToolRegistryApi for T

Blanket impl: any type that implements all subsystem traits gets ToolRegistryApi for free.