pub enum Liveness {
Live,
Dead,
Unknown,
}Expand description
Whether a process is provably still driving a run, provably not, or
neither — see RunState::liveness. Serialized as a lowercase string
("live" / "dead" / "unknown") rather than a bool: a bool has no room
for “could not tell”, and folding that case into either true or false
is exactly the wrong call for a display an operator uses to decide
whether to wait or to act — see the schema-10 field doc on
RunState::driver_pid for the report it used to produce instead.
Variants§
Live
Proven: a daemon’s heartbeat claims the run, or driver_pid answers
alive under the same identity (driver_started_at) this run recorded
for it.
Dead
Proven: no daemon claim, and either driver_pid answers dead outright
or it answers alive under a different identity than recorded — a
pid the OS has since handed to an unrelated process is exactly as
good as proof the original driver is gone (see
RunState::driver_started_at’s own doc).
Unknown
Neither proven — no daemon claim, and either no driver_pid to ask,
the platform could not answer for it, or a live pid with nothing (or
nothing queryable) to corroborate its identity against. Never treated
as Dead: see RunState::liveness_with.
Trait Implementations§
impl Copy for Liveness
Source§impl<'de> Deserialize<'de> for Liveness
impl<'de> Deserialize<'de> for Liveness
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>,
impl Eq for Liveness
impl StructuralPartialEq for Liveness
Auto Trait Implementations§
impl Freeze for Liveness
impl RefUnwindSafe for Liveness
impl Send for Liveness
impl Sync for Liveness
impl Unpin for Liveness
impl UnsafeUnpin for Liveness
impl UnwindSafe for Liveness
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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