regent_sdk/hosts/command.rs
1//! Command execution results
2//!
3//! This module provides types for handling command execution output.
4
5/// Result of executing a command on a host.
6///
7/// Contains the return code, standard output, and standard error streams
8/// from command execution.
9///
10/// # Example
11///
12/// ```no_run
13/// use regent_sdk::command::CommandResult;
14///
15/// let result = CommandResult {
16/// return_code: 0,
17/// stdout: "Command executed successfully".to_string(),
18/// stderr: "".to_string(),
19/// };
20///
21/// assert!(result.return_code == 0);
22/// ```
23#[derive(Debug)]
24pub struct CommandResult {
25 /// The exit code returned by the command.
26 ///
27 /// A value of 0 typically indicates success, while non-zero values indicate errors.
28 pub return_code: i64,
29
30 /// The standard output captured from the command execution.
31 pub stdout: String,
32
33 /// The standard error captured from the command execution.
34 pub stderr: String,
35}