pub struct ExitStatusWrapper(/* private fields */);
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§
Source§impl 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§
Source§impl Clone for ExitStatusWrapper
impl Clone for ExitStatusWrapper
Source§fn clone(&self) -> ExitStatusWrapper
fn clone(&self) -> ExitStatusWrapper
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ExitStatusWrapper
impl Debug for ExitStatusWrapper
Source§impl Display for ExitStatusWrapper
impl Display for ExitStatusWrapper
impl Copy for ExitStatusWrapper
Auto Trait Implementations§
impl Freeze for ExitStatusWrapper
impl RefUnwindSafe for ExitStatusWrapper
impl Send for ExitStatusWrapper
impl Sync for ExitStatusWrapper
impl Unpin for ExitStatusWrapper
impl UnwindSafe for ExitStatusWrapper
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes