pub enum LockOutcome {
Granted,
WouldBlock {
on: Vec<u64>,
},
Skip,
NotAvailable,
Deadlock {
victim: u64,
},
}Expand description
The result of an LockTable::acquire attempt.
Variants§
Granted
The lock is held by the requesting version.
WouldBlock
The request conflicts and the policy is Wait; the caller
should park until one of on releases. The wait-for edges are
already recorded, and no cycle was found.
Skip
SkipLocked policy and the row is locked — skip it.
NotAvailable
NoWait policy and the row is locked — fail the statement.
Deadlock
Granting the wait would close a wait-for cycle; the caller must
abort transaction victim (the youngest in the cycle) with a
deadlock error rather than park.
Trait Implementations§
Source§impl Clone for LockOutcome
impl Clone for LockOutcome
Source§fn clone(&self) -> LockOutcome
fn clone(&self) -> LockOutcome
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 LockOutcome
impl Debug for LockOutcome
impl Eq for LockOutcome
Source§impl PartialEq for LockOutcome
impl PartialEq for LockOutcome
impl StructuralPartialEq for LockOutcome
Auto Trait Implementations§
impl Freeze for LockOutcome
impl RefUnwindSafe for LockOutcome
impl Send for LockOutcome
impl Sync for LockOutcome
impl Unpin for LockOutcome
impl UnsafeUnpin for LockOutcome
impl UnwindSafe for LockOutcome
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