pub struct OwnerLease { /* private fields */ }Expand description
目录唯一 owner 租约。create_new 保证抢占是原子的;token 同时含 pid 与序号,
避免同进程多实例互相误判。租约释放时校验 token,防止误删后来者拿到的锁。
Implementations§
Trait Implementations§
Source§impl Debug for OwnerLease
impl Debug for OwnerLease
Source§impl Drop for OwnerLease
impl Drop for OwnerLease
Auto Trait Implementations§
impl Forget for OwnerLease
impl Freeze for OwnerLease
impl Move for OwnerLease
impl RefUnwindSafe for OwnerLease
impl Send for OwnerLeasewhere
RawVecInner: Send,
impl Sync for OwnerLeasewhere
RawVecInner: Sync,
impl Unpin for OwnerLease
impl UnsafeUnpin for OwnerLease
impl UnwindSafe for OwnerLeasewhere
RawVecInner: UnwindSafe,
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