pub enum Acquisition {
Granted,
Waiting,
Deadlock(Deadlock),
}Available on crate feature
std only.Expand description
The outcome of a deadlock-aware request.
Unlike try_acquire, request does not just
fail on conflict — it records the wait and tells the caller whether to
proceed, suspend, or abort.
Variants§
Granted
The lock was granted; the transaction holds it and may proceed.
Waiting
The lock is held incompatibly. The transaction is now registered as
waiting; the caller should suspend it and retry request later (for
example after a release). No deadlock was found.
Deadlock(Deadlock)
Granting the wait would close a cycle in the wait-for graph. The caller
must abort the named victim (with release_all)
to break the deadlock. The victim may be the requesting transaction
itself or another transaction in the cycle.
Trait Implementations§
Source§impl Clone for Acquisition
impl Clone for Acquisition
Source§fn clone(&self) -> Acquisition
fn clone(&self) -> Acquisition
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 Acquisition
impl Debug for Acquisition
impl Eq for Acquisition
Source§impl PartialEq for Acquisition
impl PartialEq for Acquisition
Source§fn eq(&self, other: &Acquisition) -> bool
fn eq(&self, other: &Acquisition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Acquisition
Auto Trait Implementations§
impl Freeze for Acquisition
impl RefUnwindSafe for Acquisition
impl Send for Acquisition
impl Sync for Acquisition
impl Unpin for Acquisition
impl UnsafeUnpin for Acquisition
impl UnwindSafe for Acquisition
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