pub trait ToConstraintFieldGadget<F: PrimeField> {
fn to_constraint_field<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>>, SynthesisError>;
}
Expand description
Specifies how to convert a variable of type Self
to variables of
type FpGadget<F>
Required methods
fn to_constraint_field<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>>, SynthesisError>
fn to_constraint_field<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>>, SynthesisError>
Converts self
to FpGadget<F>
variables.
Implementations on Foreign Types
sourceimpl<F: PrimeField> ToConstraintFieldGadget<F> for [Boolean]
impl<F: PrimeField> ToConstraintFieldGadget<F> for [Boolean]
fn to_constraint_field<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>>, SynthesisError>
sourceimpl<F: PrimeField> ToConstraintFieldGadget<F> for Vec<Boolean>
impl<F: PrimeField> ToConstraintFieldGadget<F> for Vec<Boolean>
fn to_constraint_field<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<F>>, SynthesisError>
sourceimpl<ConstraintF: PrimeField> ToConstraintFieldGadget<ConstraintF> for [UInt8]
impl<ConstraintF: PrimeField> ToConstraintFieldGadget<ConstraintF> for [UInt8]
Parses the Vec<UInt8>
in fixed-sized ConstraintF::Params::CAPACITY
chunks and
converts each chunk, which is assumed to be little-endian, to its FpGadget<ConstraintF>
representation.