pub struct VersionChain<V> { /* private fields */ }Expand description
MVCC version chain for a single key
Implementations§
Source§impl<V: Clone> VersionChain<V>
impl<V: Clone> VersionChain<V>
Sourcepub fn add_version(&mut self, info: VersionInfo, value: V)
pub fn add_version(&mut self, info: VersionInfo, value: V)
Add a new version
Sourcepub fn get_visible(
&self,
snapshot: &Snapshot,
txn_manager: &TransactionManager,
) -> Option<&V>
pub fn get_visible( &self, snapshot: &Snapshot, txn_manager: &TransactionManager, ) -> Option<&V>
Get visible version for a snapshot
Sourcepub fn delete(&mut self, xmax: TxnId, deleted_ts: Timestamp) -> bool
pub fn delete(&mut self, xmax: TxnId, deleted_ts: Timestamp) -> bool
Mark latest version as deleted
Sourcepub fn version_count(&self) -> usize
pub fn version_count(&self) -> usize
Number of versions
Trait Implementations§
Source§impl<V: Debug> Debug for VersionChain<V>
impl<V: Debug> Debug for VersionChain<V>
Auto Trait Implementations§
impl<V> Freeze for VersionChain<V>
impl<V> RefUnwindSafe for VersionChain<V>where
V: RefUnwindSafe,
impl<V> Send for VersionChain<V>where
V: Send,
impl<V> Sync for VersionChain<V>where
V: Sync,
impl<V> Unpin for VersionChain<V>where
V: Unpin,
impl<V> UnsafeUnpin for VersionChain<V>
impl<V> UnwindSafe for VersionChain<V>where
V: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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