Skip to main content

ToolRouterExt

Trait ToolRouterExt 

Source
pub trait ToolRouterExt<H: Send + Sync + 'static>: Sized {
    // Required method
    fn from_specs(specs: &[ToolSpec<H>], read_only: bool, pinned: bool) -> Self;
}
Expand description

Extends ToolRouter with declarative construction from a ToolSpec table.

Required Methods§

Source

fn from_specs(specs: &[ToolSpec<H>], read_only: bool, pinned: bool) -> Self

Builds a router from specs, skipping mode-gated tools.

A spec is skipped when its read_only gate coincides with read_only mode, or its pinned gate disagrees with the current pinned mode.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<H: Send + Sync + 'static> ToolRouterExt<H> for ToolRouter<H>

Source§

fn from_specs(specs: &[ToolSpec<H>], read_only: bool, pinned: bool) -> Self

Implementors§