halo2_axiom::circuit

Trait TableLayouter

Source
pub trait TableLayouter<F: Field>: Debug {
    // Required method
    fn assign_cell<'v>(
        &'v mut self,
        annotation: &'v (dyn Fn() -> String + 'v),
        column: TableColumn,
        offset: usize,
        to: &'v mut (dyn FnMut() -> Value<Assigned<F>> + 'v),
    ) -> Result<(), Error>;
}
Expand description

Helper trait for implementing a custom Layouter.

This trait is used for implementing table assignments.

Required Methods§

Source

fn assign_cell<'v>( &'v mut self, annotation: &'v (dyn Fn() -> String + 'v), column: TableColumn, offset: usize, to: &'v mut (dyn FnMut() -> Value<Assigned<F>> + 'v), ) -> Result<(), Error>

Assigns a fixed value to a table cell.

Returns an error if the table cell has already been assigned to.

Trait Implementations§

Source§

impl<'r, F: Field> From<&'r mut dyn TableLayouter<F>> for Table<'r, F>

Source§

fn from(table: &'r mut dyn TableLayouter<F>) -> Self

Converts to this type from the input type.

Implementors§

Source§

impl<'r, 'a, F: Field, CS: Assignment<F> + 'a> TableLayouter<F> for SimpleTableLayouter<'r, 'a, F, CS>