Struct snarkvm_wasm::fields::fp2::Fp2Gadget[][src]

#[must_use]pub struct Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
{ pub c0: FpGadget<F>, pub c1: FpGadget<F>, // some fields omitted }

Fields

c0: FpGadget<F>c1: FpGadget<F>

Implementations

impl<P, F> Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

pub fn new(c0: FpGadget<F>, c1: FpGadget<F>) -> Fp2Gadget<P, F>[src]

pub fn mul_fp_gadget_by_nonresidue<CS>(
    cs: CS,
    fe: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Multiply a FpGadget by quadratic nonresidue P::NONRESIDUE.

pub fn mul_by_fp_constant_in_place<CS>(
    &mut self,
    cs: CS,
    fe: &<P as Fp2Parameters>::Fp
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Multiply a Fp2Gadget by an element of fp.

pub fn mul_by_fp_constant<CS>(
    &self,
    cs: CS,
    fe: &<P as Fp2Parameters>::Fp
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Multiply a Fp2Gadget by an element of fp.

Trait Implementations

impl<P, F> AllocGadget<Fp2<P>, F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> Clone for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> CondSelectGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> ConditionalEqGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> Debug for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F> + Fp2Parameters,
    F: PrimeField
[src]

impl<P, F> Eq for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> EqGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> FieldGadget<Fp2<P>, F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

type Variable = (ConstraintVariable<F>, ConstraintVariable<F>)

impl<P, F> NEqGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> PartialEq<Fp2Gadget<P, F>> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> ThreeBitCondNegLookupGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

type TableConstant = Fp2<P>

impl<P, F> ToBitsGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> ToBytesGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> TwoBitLookupGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

type TableConstant = Fp2<P>

Auto Trait Implementations

impl<P, F> RefUnwindSafe for Fp2Gadget<P, F> where
    F: RefUnwindSafe,
    P: RefUnwindSafe

impl<P, F> Send for Fp2Gadget<P, F>

impl<P, F> Sync for Fp2Gadget<P, F>

impl<P, F> Unpin for Fp2Gadget<P, F> where
    F: Unpin,
    P: Unpin

impl<P, F> UnwindSafe for Fp2Gadget<P, F> where
    F: UnwindSafe,
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<F, T> ConditionalOrEqualsGadget<F> for T where
    T: ConditionalEqGadget<F> + CondSelectGadget<F>,
    F: Field
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F, T> OrEqualsGadget<F> for T where
    T: ConditionalOrEqualsGadget<F>,
    F: Field
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,