Enum watchexec::event::ProcessEnd
source · [−]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
sourceimpl Clone for ProcessEnd
impl Clone for ProcessEnd
sourcefn clone(&self) -> ProcessEnd
fn clone(&self) -> ProcessEnd
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ProcessEnd
impl Debug for ProcessEnd
sourceimpl From<ExitStatus> for ProcessEnd
impl From<ExitStatus> for ProcessEnd
sourcefn from(es: ExitStatus) -> Self
fn from(es: ExitStatus) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ProcessEnd> for ProcessEnd
impl PartialEq<ProcessEnd> for ProcessEnd
sourcefn eq(&self, other: &ProcessEnd) -> bool
fn eq(&self, other: &ProcessEnd) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProcessEnd) -> bool
fn ne(&self, other: &ProcessEnd) -> bool
This method tests for !=
.
impl Copy for ProcessEnd
impl Eq for ProcessEnd
impl StructuralEq for ProcessEnd
impl StructuralPartialEq for ProcessEnd
Auto Trait Implementations
impl RefUnwindSafe for ProcessEnd
impl Send for ProcessEnd
impl Sync for ProcessEnd
impl Unpin for ProcessEnd
impl UnwindSafe for ProcessEnd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more