pub struct DisplacedTableWithProvenance { /* private fields */ }Expand description
A variant of DisplacedTable that also stores “provenance” information that
can be used to generate proofs of equality.
This table expects a fourth “proof” column, though the values it hands back
are not the proofs that come in and generally should not be used directly.
To generate a proof that two values are equal, this table exports a separate
get_proof method.
Implementations§
Source§impl DisplacedTableWithProvenance
impl DisplacedTableWithProvenance
Sourcepub fn get_proof(&self, l: Value, r: Value) -> Option<Vec<ProofStep>>
pub fn get_proof(&self, l: Value, r: Value) -> Option<Vec<ProofStep>>
A simple proof generation algorithm that searches for the shortest path
in the proof graph between l and r.
The path in the graph is restricted to the timestamps at or before l
and r first became equal. This is to avoid cycles during proof
reconstruction.
Trait Implementations§
Source§impl Clone for DisplacedTableWithProvenance
impl Clone for DisplacedTableWithProvenance
Source§fn clone(&self) -> DisplacedTableWithProvenance
fn clone(&self) -> DisplacedTableWithProvenance
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 Default for DisplacedTableWithProvenance
impl Default for DisplacedTableWithProvenance
Source§fn default() -> DisplacedTableWithProvenance
fn default() -> DisplacedTableWithProvenance
Returns the “default value” for a type. Read more
Source§impl Table for DisplacedTableWithProvenance
impl Table for DisplacedTableWithProvenance
Source§fn refine_one(&self, subset: Subset, c: &Constraint) -> Subset
fn refine_one(&self, subset: Subset, c: &Constraint) -> Subset
Filter a given subset of the table for the rows matching the single constraint. Read more
Source§fn scan_generic_bounded(
&self,
subset: SubsetRef<'_>,
start: Offset,
n: usize,
cs: &[Constraint],
f: impl FnMut(RowId, &[Value]),
) -> Option<Offset>where
Self: Sized,
fn scan_generic_bounded(
&self,
subset: SubsetRef<'_>,
start: Offset,
n: usize,
cs: &[Constraint],
f: impl FnMut(RowId, &[Value]),
) -> Option<Offset>where
Self: Sized,
Iterate over the given subset of the table, starting at an opaque
start token, ending after up to n rows, returning the next start
token if more rows remain. Only invoke f on rows that match the given
constraints. Read moreSource§fn merge(&mut self, exec_state: &mut ExecutionState<'_>) -> TableChange
fn merge(&mut self, exec_state: &mut ExecutionState<'_>) -> TableChange
Merge any updates to the table, and potentially update the generation for
the table.
Source§fn get_row(&self, key: &[Value]) -> Option<Row>
fn get_row(&self, key: &[Value]) -> Option<Row>
Look up a single row by the given key values, if it is in the table. Read more
Source§fn get_row_column(&self, key: &[Value], col: ColumnId) -> Option<Value>
fn get_row_column(&self, key: &[Value], col: ColumnId) -> Option<Value>
Look up the given column of single row by the given key values, if it is
in the table. Read more
Source§fn new_buffer(&self) -> Box<dyn MutationBuffer>
fn new_buffer(&self) -> Box<dyn MutationBuffer>
Create a new buffer for staging mutations on this table.
Source§fn dyn_clone(&self) -> Box<dyn Table>
fn dyn_clone(&self) -> Box<dyn Table>
A variant of clone that returns a boxed trait object; this trait object
must contain all of the data associated with the current table.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
A boilerplate method to make it easier to downcast values of
Table. Read moreSource§fn clear(&mut self)
fn clear(&mut self)
Clear all table contents. If the table is nonempty, this will change the
generation of the table. This method also clears any pending data.
Source§fn updates_since(&self, offset: Offset) -> Subset
fn updates_since(&self, offset: Offset) -> Subset
Get the subset of the table that has appeared since the last offset.
Source§fn version(&self) -> TableVersion
fn version(&self) -> TableVersion
Source§fn fast_subset(&self, c: &Constraint) -> Option<Subset>
fn fast_subset(&self, c: &Constraint) -> Option<Subset>
An optional method for quickly generating a subset from a constraint.
The standard use-case here is to apply constraints based on a column
that is known to be sorted. Read more
Source§fn rebuilder<'a>(
&'a self,
_cols: &[ColumnId],
) -> Option<Box<dyn Rebuilder + 'a>>
fn rebuilder<'a>( &'a self, _cols: &[ColumnId], ) -> Option<Box<dyn Rebuilder + 'a>>
If this table can perform a table-level rebuild, construct a
Rebuilder for it.Source§fn apply_rebuild(
&mut self,
_table_id: TableId,
_table: &WrappedTable,
_next_ts: Value,
_exec_state: &mut ExecutionState<'_>,
)
fn apply_rebuild( &mut self, _table_id: TableId, _table: &WrappedTable, _next_ts: Value, _exec_state: &mut ExecutionState<'_>, )
Rebuild the table according to the given
Rebuilder implemented by table, if
there is one. Applying a rebuild can cause more mutations to be buffered, which can in turn
be flushed by a call to Table::merge. Read moreSource§fn scan_generic(&self, subset: SubsetRef<'_>, f: impl FnMut(RowId, &[Value]))where
Self: Sized,
fn scan_generic(&self, subset: SubsetRef<'_>, f: impl FnMut(RowId, &[Value]))where
Self: Sized,
Iterate over the given subset of the table. Read more
Source§fn refine_live(&self, subset: Subset) -> Subset
fn refine_live(&self, subset: Subset) -> Subset
Filter a given subset of the table for the rows that are live
Source§fn refine(&self, subset: Subset, cs: &[Constraint]) -> Subset
fn refine(&self, subset: Subset, cs: &[Constraint]) -> Subset
Filter a given subset of the table for the rows matching the given constraints. Read more
Source§fn split_fast_slow(
&self,
cs: &[Constraint],
) -> (Subset, Pooled<Vec<Constraint>>, Pooled<Vec<Constraint>>)
fn split_fast_slow( &self, cs: &[Constraint], ) -> (Subset, Pooled<Vec<Constraint>>, Pooled<Vec<Constraint>>)
A helper routine that leverages the existing
fast_subset method to
preprocess a set of constraints into “fast” and “slow” ones, returning
the subet of indexes that match the fast one.Auto Trait Implementations§
impl Freeze for DisplacedTableWithProvenance
impl RefUnwindSafe for DisplacedTableWithProvenance
impl Send for DisplacedTableWithProvenance
impl Sync for DisplacedTableWithProvenance
impl Unpin for DisplacedTableWithProvenance
impl UnwindSafe for DisplacedTableWithProvenance
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