pub struct VersionedValue {
pub value: Option<Vec<u8>>,
pub txn_id: TransactionId,
pub created_at: Timestamp,
pub deleted_at: Option<Timestamp>,
pub committed: bool,
}Expand description
A versioned value in MVCC
Fields§
§value: Option<Vec<u8>>The actual value
txn_id: TransactionIdTransaction ID that created this version
created_at: TimestampTimestamp when this version was created
deleted_at: Option<Timestamp>Timestamp when this version was deleted (None if still valid)
committed: boolWhether this version is committed
Implementations§
Source§impl VersionedValue
impl VersionedValue
Sourcepub fn is_visible(
&self,
snapshot_ts: Timestamp,
current_txn_id: TransactionId,
) -> bool
pub fn is_visible( &self, snapshot_ts: Timestamp, current_txn_id: TransactionId, ) -> bool
Check if this version is visible to a transaction with given snapshot timestamp
Trait Implementations§
Source§impl Clone for VersionedValue
impl Clone for VersionedValue
Source§fn clone(&self) -> VersionedValue
fn clone(&self) -> VersionedValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VersionedValue
impl RefUnwindSafe for VersionedValue
impl Send for VersionedValue
impl Sync for VersionedValue
impl Unpin for VersionedValue
impl UnwindSafe for VersionedValue
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