pub struct VersionMeta {
pub created_by: TxnId,
pub created_ts: Timestamp,
pub deleted_by: TxnId,
pub deleted_ts: Timestamp,
pub commit_ts: Timestamp,
}Expand description
Version metadata
Common metadata for all version chain implementations.
Fields§
§created_by: TxnIdTransaction that created this version
created_ts: TimestampTimestamp when this version was created
deleted_by: TxnIdTransaction that deleted this version (0 = not deleted)
deleted_ts: TimestampTimestamp when this version was deleted (0 = not deleted)
commit_ts: TimestampCommit timestamp (0 = not yet committed)
Implementations§
Source§impl VersionMeta
impl VersionMeta
Sourcepub fn new_uncommitted(created_by: TxnId, created_ts: Timestamp) -> Self
pub fn new_uncommitted(created_by: TxnId, created_ts: Timestamp) -> Self
Create metadata for a new uncommitted version
Sourcepub fn is_visible(&self, ctx: &VisibilityContext) -> bool
pub fn is_visible(&self, ctx: &VisibilityContext) -> bool
Check if this version is visible according to the context
Sourcepub fn is_committed(&self) -> bool
pub fn is_committed(&self) -> bool
Check if version is committed
Sourcepub fn is_deleted(&self) -> bool
pub fn is_deleted(&self) -> bool
Check if version is deleted
Trait Implementations§
Source§impl Clone for VersionMeta
impl Clone for VersionMeta
Source§fn clone(&self) -> VersionMeta
fn clone(&self) -> VersionMeta
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 VersionMeta
impl RefUnwindSafe for VersionMeta
impl Send for VersionMeta
impl Sync for VersionMeta
impl Unpin for VersionMeta
impl UnwindSafe for VersionMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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