pub trait ConstraintSynthesizer<F: Field>: Sync {
// Required method
fn generate_constraints<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS,
) -> Result<(), SynthesisError>;
}Expand description
Computations are expressed in terms of rank-1 constraint systems (R1CS).
The generate_constraints method is called to generate constraints for
both CRS generation and for proving.
Required Methods§
Sourcefn generate_constraints<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS,
) -> Result<(), SynthesisError>
fn generate_constraints<CS: ConstraintSystem<F>>( &self, cs: &mut CS, ) -> Result<(), SynthesisError>
Drives generation of new constraints inside CS.
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.