pub struct MoveTool { /* private fields */ }Expand description
Moves or renames a file or directory.
Tool name: fs.move
Optionally creates parent directories for the destination and can overwrite
an existing target when overwrite is set. Subject to require_read_before_write
policy on the source path.
§Example
use agentkit_tool_fs::MoveTool;
use agentkit_tools_core::Tool;
let tool = MoveTool::default();
assert_eq!(&tool.spec().name.0, "fs.move");Trait Implementations§
Source§impl Tool for MoveTool
impl Tool for MoveTool
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 MoveTool
impl RefUnwindSafe for MoveTool
impl Send for MoveTool
impl Sync for MoveTool
impl Unpin for MoveTool
impl UnsafeUnpin for MoveTool
impl UnwindSafe for MoveTool
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