pub struct CatalogRow {
pub table: Symbol,
pub key: Symbol,
pub epoch: u64,
pub data: BTreeMap<Symbol, Expr>,
/* private fields */
}Expand description
A single catalog row: deterministic Expr field data plus private live
payload cells.
The data map is serializable and participates in snapshots and deltas; the
live cells (runtime values, tests, number ops, promotion rules) are host-only
payloads kept out of serialized row data.
Fields§
§table: SymbolTable this row belongs to.
key: SymbolKey identifying the row within its table.
epoch: u64Catalog epoch at which the row was last written.
data: BTreeMap<Symbol, Expr>Deterministic, serializable field data.
Implementations§
Source§impl CatalogRow
impl CatalogRow
Sourcepub fn with_data(self, field: Symbol, value: Expr) -> Self
pub fn with_data(self, field: Symbol, value: Expr) -> Self
Returns the row with one deterministic data field set.
Sourcepub fn insert_live_value(&mut self, field: Symbol, value: Value)
pub fn insert_live_value(&mut self, field: Symbol, value: Value)
Stores a live runtime Value payload in field.
Sourcepub fn live_value(&self, field: &Symbol) -> Option<&Value>
pub fn live_value(&self, field: &Symbol) -> Option<&Value>
Returns the live Value payload in field, if present.
Sourcepub fn insert_live_test(&mut self, field: Symbol, test: Arc<dyn Test>)
pub fn insert_live_test(&mut self, field: Symbol, test: Arc<dyn Test>)
Stores a live Test payload in field.
Sourcepub fn live_test(&self, field: &Symbol) -> Option<&Arc<dyn Test>>
pub fn live_test(&self, field: &Symbol) -> Option<&Arc<dyn Test>>
Returns the live Test payload in field, if present.
Sourcepub fn insert_live_number_unary_op(&mut self, field: Symbol, op: NumberUnaryOp)
pub fn insert_live_number_unary_op(&mut self, field: Symbol, op: NumberUnaryOp)
Stores a live NumberUnaryOp payload in field.
Sourcepub fn insert_live_number_reduction_op(
&mut self,
field: Symbol,
op: NumberReductionOp,
)
pub fn insert_live_number_reduction_op( &mut self, field: Symbol, op: NumberReductionOp, )
Stores a live NumberReductionOp payload in field.
Sourcepub fn insert_live_number_binary_op(
&mut self,
field: Symbol,
op: NumberBinaryOp,
)
pub fn insert_live_number_binary_op( &mut self, field: Symbol, op: NumberBinaryOp, )
Stores a live NumberBinaryOp payload in field.
Sourcepub fn insert_live_value_number_unary_op(
&mut self,
field: Symbol,
op: ValueNumberUnaryOp,
)
pub fn insert_live_value_number_unary_op( &mut self, field: Symbol, op: ValueNumberUnaryOp, )
Stores a live ValueNumberUnaryOp payload in field.
Sourcepub fn insert_live_value_number_reduction_op(
&mut self,
field: Symbol,
op: ValueNumberReductionOp,
)
pub fn insert_live_value_number_reduction_op( &mut self, field: Symbol, op: ValueNumberReductionOp, )
Stores a live ValueNumberReductionOp payload in field.
Sourcepub fn insert_live_value_number_binary_op(
&mut self,
field: Symbol,
op: ValueNumberBinaryOp,
)
pub fn insert_live_value_number_binary_op( &mut self, field: Symbol, op: ValueNumberBinaryOp, )
Stores a live ValueNumberBinaryOp payload in field.
Sourcepub fn insert_live_promotion_rule(&mut self, field: Symbol, rule: PromotionRule)
pub fn insert_live_promotion_rule(&mut self, field: Symbol, rule: PromotionRule)
Stores a live PromotionRule payload in field.
Sourcepub fn insert_live_value_promotion_rule(
&mut self,
field: Symbol,
rule: ValuePromotionRule,
)
pub fn insert_live_value_promotion_rule( &mut self, field: Symbol, rule: ValuePromotionRule, )
Stores a live ValuePromotionRule payload in field.
Trait Implementations§
Source§impl Clone for CatalogRow
impl Clone for CatalogRow
Source§fn clone(&self) -> CatalogRow
fn clone(&self) -> CatalogRow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CatalogRow
impl Debug for CatalogRow
impl Eq for CatalogRow
Source§impl PartialEq for CatalogRow
impl PartialEq for CatalogRow
Source§fn eq(&self, other: &CatalogRow) -> bool
fn eq(&self, other: &CatalogRow) -> bool
self and other values to be equal, and is used by ==.