pub struct Write<G: ToolGate> {
gate: G,
}Expand description
Overwrite files (unrestricted) in whole
Fields§
§gate: GGate for receiving permissions to overwrite files
Implementations§
Trait Implementations§
Source§impl<G: ToolGate> CallableTool for Write<G>
impl<G: ToolGate> CallableTool for Write<G>
Source§async fn execute(
&self,
_agent: &Agent,
params: WriteParams,
) -> Result<WriteResult>
async fn execute( &self, _agent: &Agent, params: WriteParams, ) -> Result<WriteResult>
Execute a tool call.
Source§impl<G: ToolGate> Tool for Write<G>
impl<G: ToolGate> Tool for Write<G>
Source§fn description(&self) -> Option<String>
fn description(&self) -> Option<String>
Tool description, if any
Source§fn execute_unparsed<'a>(
&'a self,
agent: &'a Agent,
arguments: &'a str,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'a>>
fn execute_unparsed<'a>( &'a self, agent: &'a Agent, arguments: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'a>>
Execute this tool, arguments given in JSON format (unparsed)
Source§impl<G: ToolGate> ToolState for Write<G>
impl<G: ToolGate> ToolState for Write<G>
Source§type ParamType = WriteParams
type ParamType = WriteParams
Associated parameter type.
Source§type ResultType = WriteResult
type ResultType = WriteResult
Associated return type.
Auto Trait Implementations§
impl<G> Freeze for Write<G>where
G: Freeze,
impl<G> RefUnwindSafe for Write<G>where
G: RefUnwindSafe,
impl<G> Send for Write<G>
impl<G> Sync for Write<G>
impl<G> Unpin for Write<G>where
G: Unpin,
impl<G> UnsafeUnpin for Write<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for Write<G>where
G: UnwindSafe,
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