pub struct VersionInfo {
pub key: Vec<u8>,
pub batch_sequences: Vec<u64>,
}Expand description
Metadata for tracking versions of a specific key or row.
Fields§
§key: Vec<u8>The key or row identifier
batch_sequences: Vec<u64>List of batch sequences that contain versions of this key Sorted by (begin_ts, sequence) in descending order (newest first)
Implementations§
Source§impl VersionInfo
impl VersionInfo
Sourcepub fn add_version(&mut self, sequence: u64)
pub fn add_version(&mut self, sequence: u64)
Add a new version (batch sequence) for this key.
Maintains descending order by timestamp.
Sourcepub fn get_visible_version(
&self,
batches: &[VersionedBatch],
read_ts: u64,
) -> Option<u64>
pub fn get_visible_version( &self, batches: &[VersionedBatch], read_ts: u64, ) -> Option<u64>
Get the latest version visible to the given read timestamp.
Trait Implementations§
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
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 VersionInfo
impl RefUnwindSafe for VersionInfo
impl Send for VersionInfo
impl Sync for VersionInfo
impl Unpin for VersionInfo
impl UnsafeUnpin for VersionInfo
impl UnwindSafe for VersionInfo
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> 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