Skip to main content

CatalogRow

Struct CatalogRow 

Source
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: Symbol

Table this row belongs to.

§key: Symbol

Key identifying the row within its table.

§epoch: u64

Catalog epoch at which the row was last written.

§data: BTreeMap<Symbol, Expr>

Deterministic, serializable field data.

Implementations§

Source§

impl CatalogRow

Source

pub fn new(table: Symbol, key: Symbol) -> Self

Creates an empty row at epoch 0 for table/key.

Source

pub fn with_data(self, field: Symbol, value: Expr) -> Self

Returns the row with one deterministic data field set.

Source

pub fn insert_live_value(&mut self, field: Symbol, value: Value)

Stores a live runtime Value payload in field.

Source

pub fn live_value(&self, field: &Symbol) -> Option<&Value>

Returns the live Value payload in field, if present.

Source

pub fn insert_live_test(&mut self, field: Symbol, test: Arc<dyn Test>)

Stores a live Test payload in field.

Source

pub fn live_test(&self, field: &Symbol) -> Option<&Arc<dyn Test>>

Returns the live Test payload in field, if present.

Source

pub fn insert_live_number_unary_op(&mut self, field: Symbol, op: NumberUnaryOp)

Stores a live NumberUnaryOp payload in field.

Source

pub fn insert_live_number_reduction_op( &mut self, field: Symbol, op: NumberReductionOp, )

Stores a live NumberReductionOp payload in field.

Source

pub fn insert_live_number_binary_op( &mut self, field: Symbol, op: NumberBinaryOp, )

Stores a live NumberBinaryOp payload in field.

Source

pub fn insert_live_value_number_unary_op( &mut self, field: Symbol, op: ValueNumberUnaryOp, )

Stores a live ValueNumberUnaryOp payload in field.

Source

pub fn insert_live_value_number_reduction_op( &mut self, field: Symbol, op: ValueNumberReductionOp, )

Stores a live ValueNumberReductionOp payload in field.

Source

pub fn insert_live_value_number_binary_op( &mut self, field: Symbol, op: ValueNumberBinaryOp, )

Stores a live ValueNumberBinaryOp payload in field.

Source

pub fn insert_live_promotion_rule(&mut self, field: Symbol, rule: PromotionRule)

Stores a live PromotionRule payload in field.

Source

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

Source§

fn clone(&self) -> CatalogRow

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CatalogRow

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CatalogRow

Source§

impl PartialEq for CatalogRow

Source§

fn eq(&self, other: &CatalogRow) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CatalogRow

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.