Struct TxnId
pub struct TxnId(pub u64);Expand description
Identifies a running transaction. Drawn from the same counter as
Timestamp so that ids and timestamps never collide.
Tuple Fields§
§0: u64Implementations§
§impl TxnId
impl TxnId
pub const NONE: TxnId
pub const NONE: TxnId
An id belonging to no transaction.
Reading with this id makes every in-flight version invisible, including
the reader’s own — which is what commit-time read validation wants: it
must compare against what other transactions have committed, not
against its own uncommitted writes. 0 is never handed out, because the
oracle’s counter starts at 1.
Trait Implementations§
impl Copy for TxnId
impl Eq for TxnId
§impl Ord for TxnId
impl Ord for TxnId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialOrd for TxnId
impl PartialOrd for TxnId
impl StructuralPartialEq for TxnId
Auto Trait Implementations§
impl Freeze for TxnId
impl RefUnwindSafe for TxnId
impl Send for TxnId
impl Sync for TxnId
impl Unpin for TxnId
impl UnsafeUnpin for TxnId
impl UnwindSafe for TxnId
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