Struct wait_timeout::ExitStatus
source · pub struct ExitStatus(/* private fields */);Expand description
Exit status from a child process.
This type mirrors that in std::process but currently must be distinct as
the one in std::process cannot be created.
Implementations§
source§impl ExitStatus
impl ExitStatus
sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Returns whether this exit status represents a successful execution.
This typically means that the child process successfully exited with a status code of 0.
sourcepub fn code(&self) -> Option<i32>
pub fn code(&self) -> Option<i32>
Returns the code associated with the child’s exit event.
On Unix this can return None if the child instead exited because of a
signal. On Windows, however, this will always return Some.
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.
Trait Implementations§
source§impl Clone for ExitStatus
impl Clone for ExitStatus
source§fn clone(&self) -> ExitStatus
fn clone(&self) -> ExitStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ExitStatus
impl Debug for ExitStatus
source§impl Display for ExitStatus
impl Display for ExitStatus
source§impl PartialEq for ExitStatus
impl PartialEq for ExitStatus
source§fn eq(&self, other: &ExitStatus) -> bool
fn eq(&self, other: &ExitStatus) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for ExitStatus
impl Eq for ExitStatus
impl StructuralPartialEq for ExitStatus
Auto Trait Implementations§
impl Freeze for ExitStatus
impl RefUnwindSafe for ExitStatus
impl Send for ExitStatus
impl Sync for ExitStatus
impl Unpin for ExitStatus
impl UnwindSafe for ExitStatus
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)