pub struct SearchTool { /* private fields */ }Expand description
Built-in implementation of the search tool. No runtime state — the parameterized
schema and limits are fixed at construction time.
Implementations§
Source§impl SearchTool
impl SearchTool
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs using SearchToolConfig::default.
Sourcepub fn from_config(config: &SearchToolConfig) -> Self
pub fn from_config(config: &SearchToolConfig) -> Self
Constructs from a SearchToolConfig. The max_head_limit is reflected in the
schema’s head_limit upper bound.
Trait Implementations§
Source§impl Default for SearchTool
impl Default for SearchTool
Source§impl Tool for SearchTool
impl Tool for SearchTool
Source§fn schema(&self) -> &ToolSchema
fn schema(&self) -> &ToolSchema
Tool metadata. Returns a reference to avoid allocating on every call.
Source§fn safety_hint(&self, _args: &Value) -> SafetyClass
fn safety_hint(&self, _args: &Value) -> SafetyClass
Provides a safety-level hint to the sandbox policy without actually executing the
tool. Read more
Source§fn describe<'a>(
&'a self,
args: &'a Value,
_ctx: ToolContext<'a>,
) -> BoxFuture<'a, ToolCallDescription>
fn describe<'a>( &'a self, args: &'a Value, _ctx: ToolContext<'a>, ) -> BoxFuture<'a, ToolCallDescription>
Generates a “self-description” before execution, for display to the ACP client. Read more
Source§fn execute(&self, args: Value, ctx: ToolContext<'_>) -> ToolStream
fn execute(&self, args: Value, ctx: ToolContext<'_>) -> ToolStream
Initiates a tool call and returns an event stream. Read more
Auto Trait Implementations§
impl Freeze for SearchTool
impl RefUnwindSafe for SearchTool
impl Send for SearchTool
impl Sync for SearchTool
impl Unpin for SearchTool
impl UnsafeUnpin for SearchTool
impl UnwindSafe for SearchTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more