Skip to main content

ProcessOutcome

Struct ProcessOutcome 

Source
pub struct ProcessOutcome {
    pub program: PathBuf,
    pub provenance: ExecutableProvenance,
    pub status: ExitStatus,
    pub timed_out: bool,
    pub cancelled: bool,
    pub duration: Duration,
    pub stdout: CapturedStream,
    pub stderr: CapturedStream,
}
Expand description

Structured result from a child that was successfully spawned and reaped.

Fields§

§program: PathBuf

Program name/path selected by the caller.

§provenance: ExecutableProvenance

Provenance of the executable selection.

§status: ExitStatus

Reaped child exit status, including the post-kill status on timeout.

§timed_out: bool

True when the deadline elapsed and the runner killed the child.

§cancelled: bool

True when cooperative cancellation killed the child process scope.

§duration: Duration

Wall-clock duration including output drain and child reap.

§stdout: CapturedStream

Bounded stdout capture.

§stderr: CapturedStream

Bounded stderr capture.

Implementations§

Source§

impl ProcessOutcome

Source

pub fn into_complete_output(self) -> Result<Output, IncompleteOutputError>

Convert a captured outcome into the standard library’s complete output shape.

Machine-readable callers must use this instead of parsing retained bytes directly: inherited, truncated, or incompletely drained streams are rejected rather than being mistaken for a complete document.

Trait Implementations§

Source§

impl Debug for ProcessOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.