pub enum AcquireDecision {
Idempotent(LeaseRecord),
Grant {
supersedes: Option<u64>,
},
}Expand description
Outcome of prepare_acquire.
Variants§
Idempotent(LeaseRecord)
Same holder + same epoch with a live active lease: no side effects, return the live lease as-is.
Grant
Grant a fresh lease; supersedes names the active lease being
atomically superseded by a strictly-higher holder epoch, if any.
Trait Implementations§
Source§impl Clone for AcquireDecision
impl Clone for AcquireDecision
Source§fn clone(&self) -> AcquireDecision
fn clone(&self) -> AcquireDecision
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 AcquireDecision
impl Debug for AcquireDecision
impl Eq for AcquireDecision
Source§impl PartialEq for AcquireDecision
impl PartialEq for AcquireDecision
Source§fn eq(&self, other: &AcquireDecision) -> bool
fn eq(&self, other: &AcquireDecision) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AcquireDecision
Auto Trait Implementations§
impl Freeze for AcquireDecision
impl RefUnwindSafe for AcquireDecision
impl Send for AcquireDecision
impl Sync for AcquireDecision
impl Unpin for AcquireDecision
impl UnsafeUnpin for AcquireDecision
impl UnwindSafe for AcquireDecision
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