pub struct DeleteTool { /* private fields */ }Expand description
Deletes a file or directory.
Tool name: fs.delete
For directories, set recursive to remove non-empty directories. The
missing_ok flag suppresses errors when the target does not exist.
§Example
use agentkit_tool_fs::DeleteTool;
use agentkit_tools_core::Tool;
let tool = DeleteTool::default();
assert_eq!(&tool.spec().name.0, "fs.delete");Trait Implementations§
Source§impl Clone for DeleteTool
impl Clone for DeleteTool
Source§fn clone(&self) -> DeleteTool
fn clone(&self) -> DeleteTool
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 DeleteTool
impl Debug for DeleteTool
Source§impl Default for DeleteTool
impl Default for DeleteTool
Source§impl Tool for DeleteTool
impl Tool for DeleteTool
Source§fn proposed_requests(
&self,
request: &ToolRequest,
) -> Result<Vec<Box<dyn PermissionRequest>>, ToolError>
fn proposed_requests( &self, request: &ToolRequest, ) -> Result<Vec<Box<dyn PermissionRequest>>, ToolError>
Source§fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ToolRequest,
ctx: &'life1 mut ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ToolRequest,
ctx: &'life1 mut ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes the tool and returns a result or error. Read more
Auto Trait Implementations§
impl Freeze for DeleteTool
impl RefUnwindSafe for DeleteTool
impl Send for DeleteTool
impl Sync for DeleteTool
impl Unpin for DeleteTool
impl UnsafeUnpin for DeleteTool
impl UnwindSafe for DeleteTool
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