Skip to main content

ToolSearchEngine

Trait ToolSearchEngine 

Source
pub trait ToolSearchEngine:
    Send
    + Sync
    + Debug {
    // Required method
    fn resolve(&self, query: &str, candidates: &[SpecWithHint]) -> Vec<String>;
}
Expand description

Resolves a free-text query into a ranked list of deferred tool names. Implementations are pure functions of their inputs — no I/O, no async — so they are easy to unit-test.

Required Methods§

Source

fn resolve(&self, query: &str, candidates: &[SpecWithHint]) -> Vec<String>

Return up to max_results tool names matching query. max_results of None means “use the default cap”.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§