pub struct ProcessIdentity {
pub pid: u32,
pub start_token: String,
}Expand description
A process’s identity strong enough to survive pid reuse.
pid alone is not enough: the OS recycles pids, so a different process could
later hold the pid recorded in a stale lock. start_token is an opaque,
process-specific string (the OS-reported start time) that changes when the pid
is reused, so a lock is only “held” when both the pid is alive AND its live
start token matches the recorded one.
Fields§
§pid: u32§start_token: StringOS-reported process start marker. Empty when the platform could not report one; liveness then degrades to a bare pid-alive check (documented tradeoff).
Implementations§
Trait Implementations§
Source§impl Clone for ProcessIdentity
impl Clone for ProcessIdentity
Source§fn clone(&self) -> ProcessIdentity
fn clone(&self) -> ProcessIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessIdentity
impl Debug for ProcessIdentity
Source§impl<'de> Deserialize<'de> for ProcessIdentity
impl<'de> Deserialize<'de> for ProcessIdentity
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProcessIdentity
Source§impl PartialEq for ProcessIdentity
impl PartialEq for ProcessIdentity
Source§impl Serialize for ProcessIdentity
impl Serialize for ProcessIdentity
impl StructuralPartialEq for ProcessIdentity
Auto Trait Implementations§
impl Freeze for ProcessIdentity
impl RefUnwindSafe for ProcessIdentity
impl Send for ProcessIdentity
impl Sync for ProcessIdentity
impl Unpin for ProcessIdentity
impl UnsafeUnpin for ProcessIdentity
impl UnwindSafe for ProcessIdentity
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
Mutably borrows from an owned value. Read more