pub enum ChallengeOutcome {
Taken(DirLock),
Blocked(Option<LockHolder>),
GraceOwed {
holder: LockHolder,
grace_ms: u64,
},
}Expand description
What DirLock::challenge found, having waited for nothing to find it.
Variants§
Taken(DirLock)
The lock is this handle’s — the directory was free, or its holder was provably dead and so had nothing left to give notice to.
Blocked(Option<LockHolder>)
Another writer holds it on a lease that is still current, and there is nothing to reclaim.
Some names the holder; None is a lock file too freshly written to judge.
GraceOwed
Nobody renewed the lease. A safe hand-over owes the holder grace_ms of continued silence
before the lock changes hands: wait that out on a clock that blocks nobody, then call
DirLock::finish_challenge with this holder.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ChallengeOutcome
impl !UnwindSafe for ChallengeOutcome
impl Freeze for ChallengeOutcome
impl Send for ChallengeOutcome
impl Sync for ChallengeOutcome
impl Unpin for ChallengeOutcome
impl UnsafeUnpin for ChallengeOutcome
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