pub struct Lock {
pub id: String,
pub node_id: String,
}Expand description
A lock held by a transaction.
Released when the transaction ends, whichever way it ends. There is no method to drop it here: the lock’s lifetime is the transaction’s, which is the only thing that makes it safe to hold one across a failure.
The cluster also answers with a revision, which is 0 for a lock that is
still queued and therefore says less than it appears to. It is left out
rather than exposed as a number that means two different things.
Fields§
§id: StringThe lock’s own ID. #<id>/@state is how the cluster reports its state.
node_id: StringThe node it is held on.
Trait Implementations§
impl Eq for Lock
impl StructuralPartialEq for Lock
Auto Trait Implementations§
impl Freeze for Lock
impl RefUnwindSafe for Lock
impl Send for Lock
impl Sync for Lock
impl Unpin for Lock
impl UnsafeUnpin for Lock
impl UnwindSafe for Lock
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