logo
pub enum ProcessEnd {
    Success,
    ExitError(NonZeroI64),
    ExitSignal(SubSignal),
    ExitStop(NonZeroI32),
    Exception(NonZeroI32),
    Continued,
}
Expand description

The end status of a process.

This is a sort-of equivalent of the std::process::ExitStatus type, which is while constructable, differs on various platforms. The native type is an integer that is interpreted either through convention or via platform-dependent libc or kernel calls; our type is a more structured representation for the purpose of being clearer and transportable.

On Unix, one can tell whether a process dumped core from the exit status; this is not replicated in this structure; if that’s desirable you can obtain it manually via libc::WCOREDUMP and the ExitSignal variant.

On Unix and Windows, the exit status is a 32-bit integer; on Fuchsia it’s a 64-bit integer. For portability, we use i64. On all platforms, the “success” value is zero, so we special-case that as a variant and use NonZeroI* to niche the other values.

Variants

Success

The process ended successfully, with exit status = 0.

ExitError(NonZeroI64)

The process exited with a non-zero exit status.

ExitSignal(SubSignal)

The process exited due to a signal.

ExitStop(NonZeroI32)

The process was stopped (but not terminated) (libc::WIFSTOPPED).

Exception(NonZeroI32)

The process suffered an unhandled exception or warning (typically Windows only).

Continued

The process was continued (libc::WIFCONTINUED).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more