pub enum ExitStatus {
Code(u8),
Signal(u8),
}Expand description
How bash ended. wait(2) yields exactly one of these.
Variants§
Implementations§
Source§impl ExitStatus
impl ExitStatus
Sourcepub fn shell_code(self) -> i32
pub fn shell_code(self) -> i32
What a shell would report for it: 128 + n for a signal.
Trait Implementations§
Source§impl Clone for ExitStatus
impl Clone for ExitStatus
Source§fn clone(&self) -> ExitStatus
fn clone(&self) -> ExitStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExitStatus
Source§impl Debug for ExitStatus
impl Debug for ExitStatus
Source§impl Display for ExitStatus
impl Display for ExitStatus
impl Eq for ExitStatus
Source§impl From<ExitStatus> for ExitStatus
impl From<ExitStatus> for ExitStatus
Source§fn from(status: ExitStatus) -> Self
fn from(status: ExitStatus) -> Self
WTERMSIG is the low seven bits, WEXITSTATUS the second byte, and
after wait(2) there is no third outcome.
Source§impl PartialEq for ExitStatus
impl PartialEq 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 UnsafeUnpin 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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.