pub struct VersionChain { /* private fields */ }Expand description
MVCC version chain for a key
Implementations§
Source§impl VersionChain
impl VersionChain
Sourcepub fn add_version(&mut self, version: VersionedValue)
pub fn add_version(&mut self, version: VersionedValue)
Add a new version (inserts at front)
Sourcepub fn get_visible(
&self,
snapshot_ts: Timestamp,
current_txn_id: TransactionId,
) -> Option<Vec<u8>>
pub fn get_visible( &self, snapshot_ts: Timestamp, current_txn_id: TransactionId, ) -> Option<Vec<u8>>
Get the visible version for a transaction
Sourcepub fn commit_transaction(&mut self, txn_id: TransactionId)
pub fn commit_transaction(&mut self, txn_id: TransactionId)
Mark all versions created by a transaction as committed
Sourcepub fn rollback_transaction(&mut self, txn_id: TransactionId)
pub fn rollback_transaction(&mut self, txn_id: TransactionId)
Remove all versions created by a transaction (for rollback)
Trait Implementations§
Source§impl Clone for VersionChain
impl Clone for VersionChain
Source§fn clone(&self) -> VersionChain
fn clone(&self) -> VersionChain
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 moreSource§impl Debug for VersionChain
impl Debug for VersionChain
Auto Trait Implementations§
impl Freeze for VersionChain
impl RefUnwindSafe for VersionChain
impl Send for VersionChain
impl Sync for VersionChain
impl Unpin for VersionChain
impl UnwindSafe for VersionChain
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