pub struct ChildFinished { /* private fields */ }Expand description
How a run’s child ended and what the run kept of its output.
Implementations§
Source§impl ChildFinished
impl ChildFinished
Sourcepub const fn status(&self) -> Option<Status>
pub const fn status(&self) -> Option<Status>
Returns the child’s own status as the run reaped it, or None when
the run started no child because its cancel was already cancelled.
The status tells how the child ended even when the run stopped it.
A run whose cancel stopped a child that SIGINT ended gives
Outcome::Stopped(StopReason::Cancelled) and the status Status::Signal(2),
whose Status::shell_code is 130. A child that handles the signal
and exits with a code of its own gives that code.
Sourcepub const fn survivors(&self) -> bool
pub const fn survivors(&self) -> bool
Returns true when RunOptions::report_survivors asked, the child
ended by itself, and another process in its group still ran then.
A run that stopped the child gives false.
A process that left the group, such as one that called setsid, is
not in it, so it does not count.
Sourcepub const fn was_overdue(&self) -> bool
pub const fn was_overdue(&self) -> bool
Returns true when the report of RunOptions::overdue
ran, so the child was still running at the overdue time. The
outcome tells how the child ended after that.
Sourcepub fn into_output(self) -> (Captured, Captured)
pub fn into_output(self) -> (Captured, Captured)
Returns what the run kept of standard output and standard error.
Sourcepub const fn first_stdout(&self) -> Option<Duration>
pub const fn first_stdout(&self) -> Option<Duration>
Returns the time from the child’s start to the first byte of its
standard output, or None when it printed none, when the run inherited
standard output, or when the run discarded it and had no copy function.