pub fn circuit<F, TraceArgs, StepArgs, D>(
_name: &str,
def: D
) -> Circuit<F, TraceArgs, StepArgs> where
D: Fn(&mut CircuitContext<F, TraceArgs, StepArgs>),
Expand description
Creates a Circuit
instance by providing a name and a definition closure that is applied to a mutable CircuitContext
. The user customizes the definition closure by calling CircuitContext
functions. This is the main function that users call to define a Chiquito circuit.
Arguments:
_name: &str
: The name of the circuit. (Note: Currently, the name is not used for annotation within the function, but it may be used in future implementations.)
def: D
: A closure that defines the circuit by modifying a CircuitContext
. The closure has the following signature: Fn(&mut CircuitContext<F, TraceArgs, StepArgs>)
.
Return:
Circuit<F, TraceArgs, StepArgs>
: A new Circuit instance, as defined by the provided closure.