pub struct ReadFileTool { /* private fields */ }Expand description
Reads a UTF-8 text file, optionally limited to a 1-based inclusive line range.
Tool name: fs.read_file
When FileSystemToolResources is available in the tool context, a
successful read marks the path as inspected for the current session.
§Example
use agentkit_tool_fs::ReadFileTool;
use agentkit_tools_core::Tool;
let tool = ReadFileTool::default();
assert_eq!(&tool.spec().name.0, "fs.read_file");Trait Implementations§
Source§impl Clone for ReadFileTool
impl Clone for ReadFileTool
Source§fn clone(&self) -> ReadFileTool
fn clone(&self) -> ReadFileTool
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 ReadFileTool
impl Debug for ReadFileTool
Source§impl Default for ReadFileTool
impl Default for ReadFileTool
Source§impl Tool for ReadFileTool
impl Tool for ReadFileTool
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 ReadFileTool
impl RefUnwindSafe for ReadFileTool
impl Send for ReadFileTool
impl Sync for ReadFileTool
impl Unpin for ReadFileTool
impl UnsafeUnpin for ReadFileTool
impl UnwindSafe for ReadFileTool
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