pub enum WaitFailure {
UnprovenOwner {
evidence: Box<Evidence>,
verdict: Verdict,
timeout_ms: u64,
consequence: String,
},
LiveHolderTimedOut {
lock_path: PathBuf,
pid: i64,
command: Option<String>,
waited_ms: u64,
limit_ms: u64,
consequence: String,
},
Read(String),
}Expand description
What: What one attempt found, or why the wait ended without a result. Why: The caller reports the owner and the consequence; the attempt itself is the lock check.
In TS you’d write (pseudocode):
type IndexLockWaitError = { kind: 'unproven-owner'; evidence; verdict; timeoutMs; consequence } | { kind: 'read'; reason };Variants§
UnprovenOwner
A dead or unproven owner outlasted the unproven budget.
Fields
LiveHolderTimedOut
A proven-alive owner kept the lock until the wait limit ran out.
Fields
Read(String)
The lock or its evidence could not be read.
Trait Implementations§
Source§impl Clone for WaitFailure
impl Clone for WaitFailure
Source§impl Debug for WaitFailure
impl Debug for WaitFailure
Source§impl PartialEq for WaitFailure
impl PartialEq for WaitFailure
impl StructuralPartialEq for WaitFailure
Auto Trait Implementations§
impl Freeze for WaitFailure
impl RefUnwindSafe for WaitFailure
impl Send for WaitFailure
impl Sync for WaitFailure
impl Unpin for WaitFailure
impl UnsafeUnpin for WaitFailure
impl UnwindSafe for WaitFailure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more