pub struct WaitStatus(/* private fields */);
Expand description
A Unix-like wait status.
On Unix-like systems, processes can terminate with a combination of exit codes and signals; this struct encapsulates that information and can separate the exit code from the signal that caused the termination, or whether the process was stopped or continued.
Implementations§
Source§impl WaitStatus
impl WaitStatus
Sourcepub const fn from_raw(status: i32) -> Self
pub const fn from_raw(status: i32) -> Self
Creates a new UnixWaitStatus
from the underlying i32
status code.
Sourcepub const fn is_terminated(&self) -> bool
pub const fn is_terminated(&self) -> bool
Returns true
if the process terminated, regardless of exiting normally or by a signal.
Sourcepub const fn is_exited(&self) -> bool
pub const fn is_exited(&self) -> bool
Returns true
if the process terminated normally (i.e., exited without a signal).
Sourcepub const fn is_signaled(&self) -> bool
pub const fn is_signaled(&self) -> bool
Returns true
if the process was terminated by a signal.
Trait Implementations§
Source§impl Clone for WaitStatus
impl Clone for WaitStatus
Source§fn clone(&self) -> WaitStatus
fn clone(&self) -> WaitStatus
Returns a duplicate 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 WaitStatus
impl Debug for WaitStatus
Source§impl PartialEq for WaitStatus
impl PartialEq for WaitStatus
impl Copy for WaitStatus
impl Eq for WaitStatus
impl StructuralPartialEq for WaitStatus
Auto Trait Implementations§
impl Freeze for WaitStatus
impl RefUnwindSafe for WaitStatus
impl Send for WaitStatus
impl Sync for WaitStatus
impl Unpin for WaitStatus
impl UnwindSafe for WaitStatus
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