pub struct ShellTool { /* private fields */ }Expand description
A shell tool: bash, or powershell on Windows.
Implementations§
Source§impl ShellTool
impl ShellTool
Sourcepub fn bash(config: ToolConfig) -> Self
pub fn bash(config: ToolConfig) -> Self
The bash tool.
Sourcepub fn powershell(config: ToolConfig) -> Self
pub fn powershell(config: ToolConfig) -> Self
The powershell tool (Windows; elsewhere every call fails with a fixed message).
Trait Implementations§
Source§impl AgentTool for ShellTool
impl AgentTool for ShellTool
Source§fn meta(&self) -> &ToolDefinitionMeta
fn meta(&self) -> &ToolDefinitionMeta
Static metadata.
Source§fn execute(
&self,
call: ToolInvocation,
updates: UpdateSink,
cancel: CancellationToken,
) -> BoxFuture<'static, Result<AgentToolResult, ToolError>>
fn execute( &self, call: ToolInvocation, updates: UpdateSink, cancel: CancellationToken, ) -> BoxFuture<'static, Result<AgentToolResult, ToolError>>
Runs the call.
Err becomes an error result with the error text.Auto Trait Implementations§
impl !RefUnwindSafe for ShellTool
impl !UnwindSafe for ShellTool
impl Freeze for ShellTool
impl Send for ShellTool
impl Sync for ShellTool
impl Unpin for ShellTool
impl UnsafeUnpin for ShellTool
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