Trait halo2_frontend::circuit::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>