pub struct LockInfo {
pub agent_id: String,
pub lock_type: LockType,
pub acquired_at: Instant,
pub timeout: Option<Duration>,
}Expand description
Information about a held lock
Fields§
§agent_id: StringID of the agent holding the lock
lock_type: LockTypeType of lock
acquired_at: InstantWhen the lock was acquired
timeout: Option<Duration>Optional timeout for auto-release
Implementations§
Source§impl LockInfo
impl LockInfo
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the lock has expired
Sourcepub fn time_remaining(&self) -> Option<Duration>
pub fn time_remaining(&self) -> Option<Duration>
Get remaining time before timeout
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LockInfo
impl RefUnwindSafe for LockInfo
impl Send for LockInfo
impl Sync for LockInfo
impl Unpin for LockInfo
impl UnsafeUnpin for LockInfo
impl UnwindSafe for LockInfo
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