Trait darkfi::zk::halo2::plonk::Assignment

pub trait Assignment<F>
where F: Field,
{ // Required methods fn enter_region<NR, N>(&mut self, name_fn: N) where NR: Into<String>, N: FnOnce() -> NR; fn exit_region(&mut self); fn enable_selector<A, AR>( &mut self, annotation: A, selector: &Selector, row: usize, ) -> Result<(), Error> where A: FnOnce() -> AR, AR: Into<String>; fn query_instance( &self, column: Column<Instance>, row: usize, ) -> Result<Value<F>, Error>; fn assign_advice<V, VR, A, AR>( &mut self, annotation: A, column: Column<Advice>, row: usize, to: V, ) -> Result<(), Error> where V: FnOnce() -> Value<VR>, VR: Into<Assigned<F>>, A: FnOnce() -> AR, AR: Into<String>; fn assign_fixed<V, VR, A, AR>( &mut self, annotation: A, column: Column<Fixed>, row: usize, to: V, ) -> Result<(), Error> where V: FnOnce() -> Value<VR>, VR: Into<Assigned<F>>, A: FnOnce() -> AR, AR: Into<String>; fn copy( &mut self, left_column: Column<Any>, left_row: usize, right_column: Column<Any>, right_row: usize, ) -> Result<(), Error>; fn fill_from_row( &mut self, column: Column<Fixed>, row: usize, to: Value<Assigned<F>>, ) -> Result<(), Error>; fn push_namespace<NR, N>(&mut self, name_fn: N) where NR: Into<String>, N: FnOnce() -> NR; fn pop_namespace(&mut self, gadget_name: Option<String>); }
Expand description

This trait allows a Circuit to direct some backend to assign a witness for a constraint system.

Required Methods§

fn enter_region<NR, N>(&mut self, name_fn: N)
where NR: Into<String>, N: FnOnce() -> NR,

Creates a new region and enters into it.

Panics if we are currently in a region (if exit_region was not called).

Not intended for downstream consumption; use Layouter::assign_region instead.

fn exit_region(&mut self)

Exits the current region.

Panics if we are not currently in a region (if enter_region was not called).

Not intended for downstream consumption; use Layouter::assign_region instead.

fn enable_selector<A, AR>( &mut self, annotation: A, selector: &Selector, row: usize, ) -> Result<(), Error>
where A: FnOnce() -> AR, AR: Into<String>,

Enables a selector at the given row.

fn query_instance( &self, column: Column<Instance>, row: usize, ) -> Result<Value<F>, Error>

Queries the cell of an instance column at a particular absolute row.

Returns the cell’s value, if known.

fn assign_advice<V, VR, A, AR>( &mut self, annotation: A, column: Column<Advice>, row: usize, to: V, ) -> Result<(), Error>
where V: FnOnce() -> Value<VR>, VR: Into<Assigned<F>>, A: FnOnce() -> AR, AR: Into<String>,

Assign an advice column value (witness)

fn assign_fixed<V, VR, A, AR>( &mut self, annotation: A, column: Column<Fixed>, row: usize, to: V, ) -> Result<(), Error>
where V: FnOnce() -> Value<VR>, VR: Into<Assigned<F>>, A: FnOnce() -> AR, AR: Into<String>,

Assign a fixed value

fn copy( &mut self, left_column: Column<Any>, left_row: usize, right_column: Column<Any>, right_row: usize, ) -> Result<(), Error>

Assign two cells to have the same value

fn fill_from_row( &mut self, column: Column<Fixed>, row: usize, to: Value<Assigned<F>>, ) -> Result<(), Error>

Fills a fixed column starting from the given row with value to.

fn push_namespace<NR, N>(&mut self, name_fn: N)
where NR: Into<String>, N: FnOnce() -> NR,

Creates a new (sub)namespace and enters into it.

Not intended for downstream consumption; use Layouter::namespace instead.

fn pop_namespace(&mut self, gadget_name: Option<String>)

Exits out of the existing namespace.

Not intended for downstream consumption; use Layouter::namespace instead.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<F> Assignment<F> for MockProver<F>
where F: Field,