pub struct ExecResult {
pub exit_code: i32,
pub stdout: String,
pub stderr: String,
pub duration: Duration,
pub timed_out: bool,
}
Expand description
Result of script execution.
Contains all information about the completed script execution, including exit code, captured output, execution duration, and timeout status.
§Examples
use openrunner_rs::{run, ScriptOptions};
let options = ScriptOptions::new().openscript_path("/bin/sh");
let result = run("echo 'test'", options).await?;
println!("Exit code: {}", result.exit_code);
println!("Output: {}", result.stdout);
println!("Duration: {:?}", result.duration);
if result.timed_out {
println!("Script was terminated due to timeout");
}
Fields§
§exit_code: i32
The exit code of the script process.
stdout: String
Captured stdout from the script execution.
stderr: String
Captured stderr from the script execution.
duration: Duration
Total duration of script execution.
timed_out: bool
Whether the script was terminated due to timeout.
Trait Implementations§
Source§impl Clone for ExecResult
impl Clone for ExecResult
Source§fn clone(&self) -> ExecResult
fn clone(&self) -> ExecResult
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 ExecResult
impl Debug for ExecResult
Source§impl Default for ExecResult
impl Default for ExecResult
Source§fn default() -> ExecResult
fn default() -> ExecResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecResult
impl RefUnwindSafe for ExecResult
impl Send for ExecResult
impl Sync for ExecResult
impl Unpin for ExecResult
impl UnwindSafe for ExecResult
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