pub trait LookupTable<F: Field> {
    // Required methods
    fn columns(&self) -> Vec<Column<Any>>;
    fn annotations(&self) -> Vec<String>;

    // Provided methods
    fn advice_columns(&self) -> Vec<Column<Advice>> { ... }
    fn table_exprs(&self, meta: &mut VirtualCells<'_, F>) -> Vec<Expression<F>> { ... }
    fn annotate_columns(&self, cs: &mut ConstraintSystem<F>) { ... }
    fn annotate_columns_in_region(&self, region: &mut Region<'_, F>) { ... }
}
Expand description

Trait used to define lookup tables

Required Methods§

source

fn columns(&self) -> Vec<Column<Any>>

Returns the list of ALL the table columns following the table order.

source

fn annotations(&self) -> Vec<String>

Returns the String annotations associated to each column of the table.

Provided Methods§

source

fn advice_columns(&self) -> Vec<Column<Advice>>

Returns the list of ALL the table advice columns following the table order.

source

fn table_exprs(&self, meta: &mut VirtualCells<'_, F>) -> Vec<Expression<F>>

Return the list of expressions used to define the lookup table.

source

fn annotate_columns(&self, cs: &mut ConstraintSystem<F>)

Annotates a lookup table by passing annotations for each of it’s columns.

source

fn annotate_columns_in_region(&self, region: &mut Region<'_, F>)

Annotates columns of a table embedded within a circuit region.

Implementations on Foreign Types§

source§

impl<F: Field, C: Into<Column<Any>> + Copy, const W: usize> LookupTable<F> for [C; W]

source§

fn table_exprs(&self, meta: &mut VirtualCells<'_, F>) -> Vec<Expression<F>>

source§

fn columns(&self) -> Vec<Column<Any>>

source§

fn annotations(&self) -> Vec<String>

Implementors§