pub struct ExecResult {
pub stdout: String,
pub stderr: String,
pub exit_code: i32,
pub duration: Duration,
}Available on crate feature
sandbox only.Expand description
The result of a sandbox execution.
Non-zero exit_code is a valid result, not an error. The caller decides
how to interpret the exit code.
§Example
use adk_sandbox::ExecResult;
use std::time::Duration;
let result = ExecResult {
stdout: "hello\n".to_string(),
stderr: String::new(),
exit_code: 0,
duration: Duration::from_millis(42),
};
assert_eq!(result.exit_code, 0);Fields§
§stdout: StringCaptured standard output (UTF-8, truncated to 1 MB by backends).
stderr: StringCaptured standard error (UTF-8, truncated to 1 MB by backends).
exit_code: i32Process exit code. 0 typically means success.
duration: DurationWall-clock duration of the execution.
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 (const: unstable) · 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<'de> Deserialize<'de> for ExecResult
impl<'de> Deserialize<'de> for ExecResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ExecResult
impl Serialize for ExecResult
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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 UnsafeUnpin 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