pub enum PidLiveness {
Running,
NotRunning,
Indeterminate,
}Expand description
Tri-state PID liveness result.
Used to distinguish between definitive running/not-running states and indeterminate cases where we cannot determine the process status (e.g., permission errors, unsupported platforms).
Safety principle: Indeterminate liveness is treated conservatively as lock-owned to prevent concurrent supervisors and unsafe state cleanup.
Variants§
Running
Process is definitely running.
NotRunning
Process is definitely not running (dead/zombie).
Indeterminate
Process status cannot be determined (permission error, unsupported platform).
Implementations§
Source§impl PidLiveness
impl PidLiveness
Sourcepub fn is_definitely_not_running(self) -> bool
pub fn is_definitely_not_running(self) -> bool
Returns true if the process is definitely not running.
Use this for stale detection: only treat a lock as stale when we have definitive evidence the owner is dead.
Sourcepub fn is_running_or_indeterminate(self) -> bool
pub fn is_running_or_indeterminate(self) -> bool
Returns true if the process is running or status is indeterminate.
Use this for lock ownership checks: preserve locks when we cannot definitively prove the owner is dead.
Trait Implementations§
Source§impl Clone for PidLiveness
impl Clone for PidLiveness
Source§fn clone(&self) -> PidLiveness
fn clone(&self) -> PidLiveness
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PidLiveness
impl Debug for PidLiveness
Source§impl PartialEq for PidLiveness
impl PartialEq for PidLiveness
impl Copy for PidLiveness
impl Eq for PidLiveness
impl StructuralPartialEq for PidLiveness
Auto Trait Implementations§
impl Freeze for PidLiveness
impl RefUnwindSafe for PidLiveness
impl Send for PidLiveness
impl Sync for PidLiveness
impl Unpin for PidLiveness
impl UnsafeUnpin for PidLiveness
impl UnwindSafe for PidLiveness
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.