Trait snarkvm_wasm::prelude::ToConstraintFieldGadget [−][src]
pub trait ToConstraintFieldGadget<F> where
F: PrimeField, { fn to_constraint_field<CS>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>, Global>, SynthesisError>
where
CS: ConstraintSystem<F>; }
Expand description
Specifies how to convert a variable of type Self
to variables of
type FpGadget<F>
Required methods
fn to_constraint_field<CS>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
fn to_constraint_field<CS>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
Converts self
to FpGadget<F>
variables.
Implementors
impl<P, F> ToConstraintFieldGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField,
impl<P, F> ToConstraintFieldGadget<F> for Fp6Gadget<P, F> where
P: Fp6Parameters,
F: PrimeField,
<P as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
impl<P, F> ToConstraintFieldGadget<F> for Fp12Gadget<P, F> where
P: Fp12Parameters,
F: PrimeField,
<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
impl<TargetCurve, BaseCurve, PG> ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr> for VerifierKeyVar<TargetCurve, BaseCurve, PG> where
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
<BaseCurve as PairingEngine>::Fr: PrimeField,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr>,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G2Gadget: ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,