Struct rusty_fork::ExitStatusWrapper
source · [−]pub struct ExitStatusWrapper(_);
Expand description
Wraps std::process::ExitStatus
. Historically, this was due to the
wait_timeout
crate having its own ExitStatus
type.
Method documentation is copied from the Rust std
docs
and the wait_timeout
docs.
Implementations
sourceimpl ExitStatusWrapper
impl ExitStatusWrapper
sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Was termination successful? Signal termination is not considered a success, and success is defined as a zero exit status.
sourcepub fn code(&self) -> Option<i32>
pub fn code(&self) -> Option<i32>
Returns the exit code of the process, if any.
On Unix, this will return None
if the process was terminated by a
signal; std::os::unix
provides an extension trait for extracting the
signal and other details from the ExitStatus
.
sourcepub fn unix_signal(&self) -> Option<i32>
pub fn unix_signal(&self) -> Option<i32>
Returns the Unix signal which terminated this process.
Note that on Windows this will always return None and on Unix this will return None if the process successfully exited otherwise.
For simplicity and to match wait_timeout
, this method is always
present even on systems that do not support it.
Trait Implementations
sourceimpl Clone for ExitStatusWrapper
impl Clone for ExitStatusWrapper
sourcefn clone(&self) -> ExitStatusWrapper
fn clone(&self) -> ExitStatusWrapper
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExitStatusWrapper
impl Debug for ExitStatusWrapper
sourceimpl Display for ExitStatusWrapper
impl Display for ExitStatusWrapper
impl Copy for ExitStatusWrapper
Auto Trait Implementations
impl RefUnwindSafe for ExitStatusWrapper
impl Send for ExitStatusWrapper
impl Sync for ExitStatusWrapper
impl Unpin for ExitStatusWrapper
impl UnwindSafe for ExitStatusWrapper
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more