pub trait FloorPlanner {
// Required method
fn synthesize<F: Field, CS: Assignment<F> + SyncDeps, C: Circuit<F>>(
cs: &mut CS,
circuit: &C,
config: C::Config,
constants: Vec<Column<Fixed>>,
) -> Result<(), Error>;
}
Expand description
A floor planning strategy for a circuit.
The floor planner is chip-agnostic and applies its strategy to the circuit it is used within.
Required Methods§
Sourcefn synthesize<F: Field, CS: Assignment<F> + SyncDeps, C: Circuit<F>>(
cs: &mut CS,
circuit: &C,
config: C::Config,
constants: Vec<Column<Fixed>>,
) -> Result<(), Error>
fn synthesize<F: Field, CS: Assignment<F> + SyncDeps, C: Circuit<F>>( cs: &mut CS, circuit: &C, config: C::Config, constants: Vec<Column<Fixed>>, ) -> Result<(), Error>
Given the provided cs
, synthesize the given circuit.
constants
is the list of fixed columns that the layouter may use to assign
global constant values. These columns will all have been equality-enabled.
Internally, a floor planner will perform the following operations:
- Instantiate a
Layouter
for this floor planner. - Perform any necessary setup or measurement tasks, which may involve one or more
calls to
Circuit::default().synthesize(config, &mut layouter)
. - Call
circuit.synthesize(config, &mut layouter)
exactly once.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.