pub struct CapturedOutput {
pub exit_code: Option<i32>,
pub success: bool,
pub stdout: String,
pub stderr: String,
pub duration: Duration,
pub timed_out: bool,
}Expand description
Captured output of one subprocess invocation.
Carries enough information for the sweep report to be self-contained
without re-running anything: both stdout and stderr are retained, the
duration is wall-clock between spawn and reap, and timed_out is true
iff the watchdog had to SIGKILL the child.
Fields§
§exit_code: Option<i32>Process exit code, or None if the OS didn’t surface one
(signal-killed, including our own SIGKILL on timeout).
success: booltrue iff exit_code == Some(0). Pre-computed so callers
don’t have to remember the unwrap.
stdout: StringStandard output, lossy-decoded as UTF-8 (Nix only emits ASCII or valid UTF-8 in practice; we never silently swallow bytes).
stderr: StringStandard error, lossy-decoded as UTF-8.
duration: DurationWall-clock duration of the invocation.
timed_out: booltrue iff the watchdog had to kill the child.
Implementations§
Source§impl CapturedOutput
impl CapturedOutput
Sourcepub fn from_parts(
status: ExitStatus,
stdout: Vec<u8>,
stderr: Vec<u8>,
duration: Duration,
timed_out: bool,
) -> Self
pub fn from_parts( status: ExitStatus, stdout: Vec<u8>, stderr: Vec<u8>, duration: Duration, timed_out: bool, ) -> Self
Build a CapturedOutput from the raw parts the standard
library produces.
Sourcepub fn spawn_failure(message: String, duration: Duration) -> Self
pub fn spawn_failure(message: String, duration: Duration) -> Self
Build an output representing a spawn failure (binary missing,
EACCES, etc.). The probe still gets recorded; the verdict
will be a “fail-only” against whichever side blew up.
Trait Implementations§
Source§impl Clone for CapturedOutput
impl Clone for CapturedOutput
Source§fn clone(&self) -> CapturedOutput
fn clone(&self) -> CapturedOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapturedOutput
impl Debug for CapturedOutput
Source§impl<'de> Deserialize<'de> for CapturedOutput
impl<'de> Deserialize<'de> for CapturedOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CapturedOutput
impl RefUnwindSafe for CapturedOutput
impl Send for CapturedOutput
impl Sync for CapturedOutput
impl Unpin for CapturedOutput
impl UnsafeUnpin for CapturedOutput
impl UnwindSafe for CapturedOutput
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.