pub struct ToolExecutionResult {
pub exit_code: i32,
pub stdout: Option<String>,
pub stderr: Option<String>,
}
Expand description
Result of tool execution
Fields§
§exit_code: i32
Exit code of the process
stdout: Option<String>
Standard output (if captured)
stderr: Option<String>
Standard error (if captured)
Implementations§
Source§impl ToolExecutionResult
impl ToolExecutionResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the execution was successful
Sourcepub fn with_stdout(self, stdout: impl Into<String>) -> Self
pub fn with_stdout(self, stdout: impl Into<String>) -> Self
Add stdout to the result
Sourcepub fn with_stderr(self, stderr: impl Into<String>) -> Self
pub fn with_stderr(self, stderr: impl Into<String>) -> Self
Add stderr to the result
Trait Implementations§
Source§impl Clone for ToolExecutionResult
impl Clone for ToolExecutionResult
Source§fn clone(&self) -> ToolExecutionResult
fn clone(&self) -> ToolExecutionResult
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 ToolExecutionResult
impl Debug for ToolExecutionResult
Source§impl PartialEq for ToolExecutionResult
impl PartialEq for ToolExecutionResult
impl Eq for ToolExecutionResult
impl StructuralPartialEq for ToolExecutionResult
Auto Trait Implementations§
impl Freeze for ToolExecutionResult
impl RefUnwindSafe for ToolExecutionResult
impl Send for ToolExecutionResult
impl Sync for ToolExecutionResult
impl Unpin for ToolExecutionResult
impl UnwindSafe for ToolExecutionResult
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