pub enum ProcStopReason {
Stopped,
Exited(i32, String),
Killed(i32, bool),
Watchdog,
HostWatchdog,
Unknown,
}
Expand description
The reason a proc stopped.
Variants§
Stopped
The proc stopped gracefully, e.g., with exit code 0.
Exited(i32, String)
The proc exited with the provided error code and stderr
Killed(i32, bool)
The proc was killed. The signal number is indicated; the flags determines whether there was a core dump.
Watchdog
The proc failed to respond to a watchdog request within a timeout.
HostWatchdog
The host running the proc failed to respond to a watchdog request within a timeout.
Unknown
The proc failed for an unknown reason.
Implementations§
Source§impl ProcStopReason
impl ProcStopReason
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Returns true if this is a ProcStopReason::Stopped
, otherwise false
Sourcepub fn is_exited(&self) -> bool
pub fn is_exited(&self) -> bool
Returns true if this is a ProcStopReason::Exited
, otherwise false
Sourcepub fn as_exited_mut(&mut self) -> Option<(&mut i32, &mut String)>
pub fn as_exited_mut(&mut self) -> Option<(&mut i32, &mut String)>
Optionally returns mutable references to the inner fields if this is a ProcStopReason::Exited
, otherwise None
Sourcepub fn as_exited(&self) -> Option<(&i32, &String)>
pub fn as_exited(&self) -> Option<(&i32, &String)>
Optionally returns references to the inner fields if this is a ProcStopReason::Exited
, otherwise None
Sourcepub fn into_exited(self) -> Result<(i32, String), Self>
pub fn into_exited(self) -> Result<(i32, String), Self>
Returns the inner fields if this is a ProcStopReason::Exited
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_killed(&self) -> bool
pub fn is_killed(&self) -> bool
Returns true if this is a ProcStopReason::Killed
, otherwise false
Sourcepub fn as_killed_mut(&mut self) -> Option<(&mut i32, &mut bool)>
pub fn as_killed_mut(&mut self) -> Option<(&mut i32, &mut bool)>
Optionally returns mutable references to the inner fields if this is a ProcStopReason::Killed
, otherwise None
Sourcepub fn as_killed(&self) -> Option<(&i32, &bool)>
pub fn as_killed(&self) -> Option<(&i32, &bool)>
Optionally returns references to the inner fields if this is a ProcStopReason::Killed
, otherwise None
Sourcepub fn into_killed(self) -> Result<(i32, bool), Self>
pub fn into_killed(self) -> Result<(i32, bool), Self>
Returns the inner fields if this is a ProcStopReason::Killed
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_watchdog(&self) -> bool
pub fn is_watchdog(&self) -> bool
Returns true if this is a ProcStopReason::Watchdog
, otherwise false
Sourcepub fn is_host_watchdog(&self) -> bool
pub fn is_host_watchdog(&self) -> bool
Returns true if this is a ProcStopReason::HostWatchdog
, otherwise false
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if this is a ProcStopReason::Unknown
, otherwise false
Trait Implementations§
Source§impl Clone for ProcStopReason
impl Clone for ProcStopReason
Source§fn clone(&self) -> ProcStopReason
fn clone(&self) -> ProcStopReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProcStopReason
impl Debug for ProcStopReason
Source§impl<'de> Deserialize<'de> for ProcStopReason
impl<'de> Deserialize<'de> for ProcStopReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ProcStopReason
impl Display for ProcStopReason
Source§impl PartialEq for ProcStopReason
impl PartialEq for ProcStopReason
Source§impl Serialize for ProcStopReason
impl Serialize for ProcStopReason
impl Eq for ProcStopReason
impl StructuralPartialEq for ProcStopReason
Auto Trait Implementations§
impl Freeze for ProcStopReason
impl RefUnwindSafe for ProcStopReason
impl Send for ProcStopReason
impl Sync for ProcStopReason
impl Unpin for ProcStopReason
impl UnwindSafe for ProcStopReason
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more