pub struct FetchTool { /* private fields */ }Expand description
Built-in implementation of the fetch tool. Stateless — a singleton
Arc::new(FetchTool::new(cfg)) suffices.
Implementations§
Source§impl FetchTool
impl FetchTool
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs using FetchToolConfig::default.
Sourcepub fn from_config(config: &FetchToolConfig) -> Self
pub fn from_config(config: &FetchToolConfig) -> Self
Constructs from a FetchToolConfig.
Trait Implementations§
Source§impl Tool for FetchTool
impl Tool for FetchTool
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 FetchTool
impl RefUnwindSafe for FetchTool
impl Send for FetchTool
impl Sync for FetchTool
impl Unpin for FetchTool
impl UnsafeUnpin for FetchTool
impl UnwindSafe for FetchTool
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