pub struct BashTool;Expand description
Bash execution tool implementation
Implementations§
Source§impl BashTool
impl BashTool
Sourcepub fn execute(
tool_use_id: &str,
tool_name: &str,
input: &Value,
context: &ToolContext,
) -> ToolResult
pub fn execute( tool_use_id: &str, tool_name: &str, input: &Value, context: &ToolContext, ) -> ToolResult
Execute a bash command tool
Sourcepub fn execute_with_sudo(
tool_use_id: &str,
tool_name: &str,
input: &Value,
context: &ToolContext,
password: Zeroizing<String>,
) -> ToolResult
pub fn execute_with_sudo( tool_use_id: &str, tool_name: &str, input: &Value, context: &ToolContext, password: Zeroizing<String>, ) -> ToolResult
Execute a bash command that requires sudo, piping the password via stdin.
Auto Trait Implementations§
impl Freeze for BashTool
impl RefUnwindSafe for BashTool
impl Send for BashTool
impl Sync for BashTool
impl Unpin for BashTool
impl UnsafeUnpin for BashTool
impl UnwindSafe for BashTool
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