pub struct TableState {
pub version: u64,
pub table_meta: TableMeta,
pub segments: HashMap<SegmentId, SegmentMeta>,
pub table_coverage: Option<TableCoveragePointer>,
}Expand description
In-memory view of table metadata and live segments, reconstructed from the log.
Invariant:
versionmatches the CURRENT pointer.table_metaandsegmentsare the result of applying all commits from version 1 throughversionin order.
Fields§
§version: u64Latest committed version recorded in CURRENT.
table_meta: TableMetaTable-level metadata reconstructed from the log.
segments: HashMap<SegmentId, SegmentMeta>Current live segments keyed by SegmentId.
table_coverage: Option<TableCoveragePointer>Optional pointer to the latest table coverage metadata.
Implementations§
Source§impl TableState
impl TableState
Sourcepub fn segments_sorted_by_time(&self) -> Vec<&SegmentMeta>
pub fn segments_sorted_by_time(&self) -> Vec<&SegmentMeta>
Return live segments sorted deterministically by time.
Ordering is by ts_min, then ts_max, and finally segment_id as a
stable tie-breaker.
Trait Implementations§
Source§impl Clone for TableState
impl Clone for TableState
Source§fn clone(&self) -> TableState
fn clone(&self) -> TableState
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 TableState
impl Debug for TableState
Source§impl PartialEq for TableState
impl PartialEq for TableState
impl Eq for TableState
impl StructuralPartialEq for TableState
Auto Trait Implementations§
impl Freeze for TableState
impl RefUnwindSafe for TableState
impl Send for TableState
impl Sync for TableState
impl Unpin for TableState
impl UnsafeUnpin for TableState
impl UnwindSafe for TableState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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