pub struct SandboxResult {
pub exit_code: i32,
pub signal: Option<i32>,
pub timed_out: bool,
pub memory_peak: u64,
pub cpu_time_us: u64,
pub wall_time_ms: u64,
}Expand description
Sandbox execution result
Fields§
§exit_code: i32Exit code
signal: Option<i32>Signal that killed process (if any)
timed_out: boolWhether timeout occurred
memory_peak: u64Memory usage in bytes
cpu_time_us: u64CPU time in microseconds
wall_time_ms: u64Wall clock time in seconds
Implementations§
Source§impl SandboxResult
impl SandboxResult
Sourcepub fn killed_by_seccomp(&self) -> bool
pub fn killed_by_seccomp(&self) -> bool
Check if process was killed by seccomp (SIGSYS - signal 31) Returns true if exit code is 159 (128 + 31)
Sourcepub fn seccomp_error(&self) -> Option<&'static str>
pub fn seccomp_error(&self) -> Option<&'static str>
Get human-readable error message if process failed due to seccomp
Sourcepub fn check_seccomp_error(&self) -> Result<&SandboxResult>
pub fn check_seccomp_error(&self) -> Result<&SandboxResult>
Convert to Result, returning error if process was killed by seccomp
Trait Implementations§
Source§impl Clone for SandboxResult
impl Clone for SandboxResult
Source§fn clone(&self) -> SandboxResult
fn clone(&self) -> SandboxResult
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 moreAuto Trait Implementations§
impl Freeze for SandboxResult
impl RefUnwindSafe for SandboxResult
impl Send for SandboxResult
impl Sync for SandboxResult
impl Unpin for SandboxResult
impl UnwindSafe for SandboxResult
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