pub struct CustomToolExecutor { /* private fields */ }Expand description
Custom Tool Executor for executing custom tools defined in configuration
Implementations§
Source§impl CustomToolExecutor
impl CustomToolExecutor
Sourcepub async fn register_tool(&self, tool: CustomToolConfig) -> Result<()>
pub async fn register_tool(&self, tool: CustomToolConfig) -> Result<()>
Registers a custom tool from configuration
§Arguments
tool- The custom tool configuration to register
Sourcepub async fn register_tools(&self, tools: Vec<CustomToolConfig>) -> Result<()>
pub async fn register_tools(&self, tools: Vec<CustomToolConfig>) -> Result<()>
Registers multiple custom tools
Sourcepub async fn unregister_tool(&self, tool_id: &str) -> Result<()>
pub async fn unregister_tool(&self, tool_id: &str) -> Result<()>
Unregisters a custom tool
Sourcepub async fn get_tool(&self, tool_id: &str) -> Result<CustomToolConfig>
pub async fn get_tool(&self, tool_id: &str) -> Result<CustomToolConfig>
Gets a registered custom tool
Sourcepub async fn list_tools(&self) -> Vec<CustomToolConfig>
pub async fn list_tools(&self) -> Vec<CustomToolConfig>
Lists all registered custom tools
Sourcepub async fn tool_count(&self) -> usize
pub async fn tool_count(&self) -> usize
Gets the count of registered custom tools
Sourcepub async fn clear_tools(&self)
pub async fn clear_tools(&self)
Clears all registered custom tools
Trait Implementations§
Source§impl Clone for CustomToolExecutor
impl Clone for CustomToolExecutor
Source§fn clone(&self) -> CustomToolExecutor
fn clone(&self) -> CustomToolExecutor
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 moreSource§impl Debug for CustomToolExecutor
impl Debug for CustomToolExecutor
Auto Trait Implementations§
impl Freeze for CustomToolExecutor
impl !RefUnwindSafe for CustomToolExecutor
impl Send for CustomToolExecutor
impl Sync for CustomToolExecutor
impl Unpin for CustomToolExecutor
impl !UnwindSafe for CustomToolExecutor
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