Enum kimchi::snarky::runner::Constraint
source · pub enum Constraint<F: PrimeField> {
BasicSnarkyConstraint(BasicSnarkyConstraint<FieldVar<F>>),
KimchiConstraint(KimchiConstraint<FieldVar<F>, F>),
}
Expand description
An enum that wraps either a BasicSnarkyConstraint
or a [KimchiConstraintSystem
].
Variants§
BasicSnarkyConstraint(BasicSnarkyConstraint<FieldVar<F>>)
Old R1CS-like constraints.
KimchiConstraint(KimchiConstraint<FieldVar<F>, F>)
Custom gates in kimchi.
Implementations§
source§impl<F> Constraint<F>where
F: PrimeField,
impl<F> Constraint<F>where F: PrimeField,
sourcepub fn check_constraint(
&self,
env: &impl WitnessGeneration<F>
) -> SnarkyRuntimeResult<()>
pub fn check_constraint( &self, env: &impl WitnessGeneration<F> ) -> SnarkyRuntimeResult<()>
In witness generation, this checks if the constraint is satisfied by some witness values.
Trait Implementations§
Auto Trait Implementations§
impl<F> RefUnwindSafe for Constraint<F>where F: RefUnwindSafe,
impl<F> Send for Constraint<F>
impl<F> Sync for Constraint<F>
impl<F> Unpin for Constraint<F>where F: Unpin,
impl<F> UnwindSafe for Constraint<F>where F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more