Trait snarkvm_wasm::prelude::ConditionalEqGadget [−][src]
pub trait ConditionalEqGadget<F>: Eq where
F: Field, { fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError>
where
CS: ConstraintSystem<F>; fn cost() -> usize; }
Expand description
If condition == 1
, then enforces that self
and other
are equal;
otherwise, it doesn’t enforce anything.