pub struct OwnerLockRecord {
pub token: String,
pub owner_pid: i64,
pub owner_birth_identity: String,
pub transaction_id: Option<String>,
}Expand description
What:
The durable owner of one published lock.
A struct groups named fields;
Option<String> is “text or nothing”.
Why:
The token distinguishes this acquisition from every other;
the PID and birth
identity prove liveness;
the reservation lock also names its transaction.
In TS you’d write (pseudocode):
type OwnerLockRecord = { schemaVersion: 1; token: string; ownerPid: number; ownerBirthIdentity: string; transactionId?: string };Fields§
§token: StringUnguessable token of this acquisition.
owner_pid: i64Owning process ID.
owner_birth_identity: StringProcess-birth identity of the owner.
transaction_id: Option<String>Commit transaction the lock is held for, recorded by the landing reservation.
Trait Implementations§
Source§impl Clone for OwnerLockRecord
impl Clone for OwnerLockRecord
Source§impl Debug for OwnerLockRecord
impl Debug for OwnerLockRecord
impl Eq for OwnerLockRecord
Source§impl PartialEq for OwnerLockRecord
impl PartialEq for OwnerLockRecord
impl StructuralPartialEq for OwnerLockRecord
Auto Trait Implementations§
impl Freeze for OwnerLockRecord
impl RefUnwindSafe for OwnerLockRecord
impl Send for OwnerLockRecord
impl Sync for OwnerLockRecord
impl Unpin for OwnerLockRecord
impl UnsafeUnpin for OwnerLockRecord
impl UnwindSafe for OwnerLockRecord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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