pub trait ToConstraintFieldGadget<ConstraintF: PrimeField> {
    fn to_constraint_field(
        &self
    ) -> Result<Vec<FpVar<ConstraintF>>, SynthesisError>; }
Expand description

Specifies how to convert a variable of type Self to variables of type FpVar<ConstraintF>

Required Methods§

Converts self to FpVar<ConstraintF> variables.

Implementations on Foreign Types§

Parses the Vec<UInt8<ConstraintF>> in fixed-sized ConstraintF::MODULUS_BIT_SIZE - 1 chunks and converts each chunk, which is assumed to be little-endian, to its FpVar<ConstraintF> representation. This is the gadget counterpart to the [u8] implementation of ToConstraintField.

Implementors§