pub struct ToolsetTool {
pub toolset_id: Option<String>,
pub tool_def: ToolDefinition,
pub max_retries: u32,
}Expand description
A tool that belongs to a toolset.
This wraps a tool definition with additional metadata about the toolset it belongs to.
Fields§
§toolset_id: Option<String>The toolset that owns this tool.
tool_def: ToolDefinitionThe tool definition.
max_retries: u32Maximum retries for this tool.
Implementations§
Source§impl ToolsetTool
impl ToolsetTool
Sourcepub fn new(tool_def: ToolDefinition) -> ToolsetTool
pub fn new(tool_def: ToolDefinition) -> ToolsetTool
Create a new toolset tool.
Sourcepub fn with_toolset_id(self, id: impl Into<String>) -> ToolsetTool
pub fn with_toolset_id(self, id: impl Into<String>) -> ToolsetTool
Set the toolset ID.
Sourcepub fn with_max_retries(self, retries: u32) -> ToolsetTool
pub fn with_max_retries(self, retries: u32) -> ToolsetTool
Set max retries.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get the tool description.
Trait Implementations§
Source§impl Clone for ToolsetTool
impl Clone for ToolsetTool
Source§fn clone(&self) -> ToolsetTool
fn clone(&self) -> ToolsetTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolsetTool
impl RefUnwindSafe for ToolsetTool
impl Send for ToolsetTool
impl Sync for ToolsetTool
impl Unpin for ToolsetTool
impl UnwindSafe for ToolsetTool
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