Enum unshare::ExitStatus[][src]

pub enum ExitStatus {
    Exited(i8),
    Signaled(Signalbool),
}

The exit status of a process

Returned either by reap_zombies() or by child_events() or by Child::wait()

Variants

Exited(i8)

Process exited normally with some exit code

Signaled(Signalbool)

Process was killed by a signal (bool flag is true when core is dumped)

Implementations

impl ExitStatus[src]

pub fn success(&self) -> bool[src]

Returns true if this exit status means successful exit

pub fn code(&self) -> Option<i32>[src]

Returns exit code if the process has exited normally

pub fn signal(&self) -> Option<i32>[src]

Returns signal number if he process was killed by signal

Trait Implementations

impl Clone for ExitStatus[src]

impl Copy for ExitStatus[src]

impl Debug for ExitStatus[src]

impl Display for ExitStatus[src]

impl Eq for ExitStatus[src]

impl PartialEq<ExitStatus> for ExitStatus[src]

impl StructuralEq for ExitStatus[src]

impl StructuralPartialEq for ExitStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.