pub struct VersionChain<T> { /* private fields */ }Expand description
Version store for a single key’s version chain
Implementations§
Source§impl<T: Clone> VersionChain<T>
impl<T: Clone> VersionChain<T>
Sourcepub fn add_version(&self, value: T, txn_id: TxnId, timestamp: u64)
pub fn add_version(&self, value: T, txn_id: TxnId, timestamp: u64)
Add a new version
Sourcepub fn get_visible(&self, read_txn: TxnId) -> Option<T>
pub fn get_visible(&self, read_txn: TxnId) -> Option<T>
Get the visible version for a transaction
Sourcepub fn mark_deleted(&self, txn_id: TxnId) -> bool
pub fn mark_deleted(&self, txn_id: TxnId) -> bool
Mark the current version as deleted
Trait Implementations§
Source§impl<T: Debug> Debug for VersionChain<T>
impl<T: Debug> Debug for VersionChain<T>
Auto Trait Implementations§
impl<T> !Freeze for VersionChain<T>
impl<T> !RefUnwindSafe for VersionChain<T>
impl<T> Send for VersionChain<T>where
T: Send,
impl<T> Sync for VersionChain<T>
impl<T> Unpin for VersionChain<T>where
T: Unpin,
impl<T> UnsafeUnpin for VersionChain<T>
impl<T> UnwindSafe for VersionChain<T>where
T: UnwindSafe,
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
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