pub struct ToolDef {
pub name: &'static str,
pub description: &'static str,
pub parameters: Vec<ToolParam>,
pub execute: SyncExecuteFn,
}Expand description
A tool that the agent can invoke.
Fields§
§name: &'static str§description: &'static str§parameters: Vec<ToolParam>§execute: SyncExecuteFnThe sync function that executes the tool. This is wrapped in an async context by execute_tool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolDef
impl RefUnwindSafe for ToolDef
impl Send for ToolDef
impl Sync for ToolDef
impl Unpin for ToolDef
impl UnsafeUnpin for ToolDef
impl UnwindSafe for ToolDef
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