pub struct LockHolder {
pub identity: ProcessIdentity,
pub executable: Option<PathBuf>,
pub acquired_at: DateTime<Utc>,
pub lock: LockKind,
}Expand description
Who holds a lock, as recorded by the holder itself.
Written into the lock file after the lock is taken, so that the process that loses the race can say something useful instead of “somebody else”.
Fields§
§identity: ProcessIdentityThe holder’s process identity — a PID alone would not survive being read back by a process that started after a reboot.
executable: Option<PathBuf>The holder’s executable, when it could be resolved. 05-infrastructure.md
requires service status to report a stale or moved binary path, and
an operator looking at a contended lock has the same question.
acquired_at: DateTime<Utc>When the lock was taken.
lock: LockKindWhich lock the record belongs to. Recorded so that a file opened by mistake is recognised rather than misreported.
Trait Implementations§
Source§impl Clone for LockHolder
impl Clone for LockHolder
Source§fn clone(&self) -> LockHolder
fn clone(&self) -> LockHolder
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 LockHolder
impl Debug for LockHolder
Source§impl<'de> Deserialize<'de> for LockHolder
impl<'de> Deserialize<'de> for LockHolder
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
Source§impl Display for LockHolder
impl Display for LockHolder
impl Eq for LockHolder
Source§impl PartialEq for LockHolder
impl PartialEq for LockHolder
Source§impl Serialize for LockHolder
impl Serialize for LockHolder
impl StructuralPartialEq for LockHolder
Auto Trait Implementations§
impl Freeze for LockHolder
impl RefUnwindSafe for LockHolder
impl Send for LockHolder
impl Sync for LockHolder
impl Unpin for LockHolder
impl UnsafeUnpin for LockHolder
impl UnwindSafe for LockHolder
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