pub struct CommandResult {
pub return_code: i64,
pub stdout: String,
pub stderr: String,
}Expand description
Result of executing a command on a host.
Contains the return code, standard output, and standard error streams from command execution.
§Example
use regent_sdk::command::CommandResult;
let result = CommandResult {
return_code: 0,
stdout: "Command executed successfully".to_string(),
stderr: "".to_string(),
};
assert!(result.return_code == 0);Fields§
§return_code: i64The exit code returned by the command.
A value of 0 typically indicates success, while non-zero values indicate errors.
stdout: StringThe standard output captured from the command execution.
stderr: StringThe standard error captured from the command execution.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandResult
impl RefUnwindSafe for CommandResult
impl Send for CommandResult
impl Sync for CommandResult
impl Unpin for CommandResult
impl UnsafeUnpin for CommandResult
impl UnwindSafe for CommandResult
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