pub struct View<G: ToolGate> {
gate: G,
}Expand description
Allow reading files (unrestricted), in whole or in part.
Fields§
§gate: GGate for receiving permissions to read files
Implementations§
Trait Implementations§
Source§impl<G: ToolGate> CallableTool for View<G>
impl<G: ToolGate> CallableTool for View<G>
Source§async fn execute(
&self,
_agent: &Agent,
params: ViewParams,
) -> Result<ViewResult>
async fn execute( &self, _agent: &Agent, params: ViewParams, ) -> Result<ViewResult>
Execute a tool call.
Source§impl<G: ToolGate> Tool for View<G>
impl<G: ToolGate> Tool for View<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 View<G>
impl<G: ToolGate> ToolState for View<G>
Source§type ParamType = ViewParams
type ParamType = ViewParams
Associated parameter type.
Source§type ResultType = ViewResult
type ResultType = ViewResult
Associated return type.
Auto Trait Implementations§
impl<G> Freeze for View<G>where
G: Freeze,
impl<G> RefUnwindSafe for View<G>where
G: RefUnwindSafe,
impl<G> Send for View<G>
impl<G> Sync for View<G>
impl<G> Unpin for View<G>where
G: Unpin,
impl<G> UnsafeUnpin for View<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for View<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