Enum snarkvm_wasm::fields::FpGadget[][src]

pub enum FpGadget<F> where
    F: PrimeField
{ Constant(F), Variable(AllocatedFp<F>), }

Represent variables corresponding to a field element in F.

Variants

Constant(F)

Constant (not an allocated variable).

Variable(AllocatedFp<F>)

Allocated variable in the constraint system.

Trait Implementations

impl<F> AllocGadget<F, F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> Clone for FpGadget<F> where
    F: Clone + PrimeField
[src]

impl<F> CondSelectGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> ConditionalEqGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> Debug for FpGadget<F> where
    F: Debug + PrimeField
[src]

impl<F> Eq for FpGadget<F> where
    F: PrimeField
[src]

impl<F> EqGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> FieldGadget<F, F> for FpGadget<F> where
    F: PrimeField
[src]

type Variable = ConstraintVariable<F>

impl<F> From<AllocatedFp<F>> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> NEqGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> PartialEq<FpGadget<F>> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> ThreeBitCondNegLookupGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

type TableConstant = F

impl<F> ToBitsGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

pub fn to_bits<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Outputs the binary representation of the value in self in big-endian form.

impl<F> ToBytesGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> TwoBitLookupGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

Uses two bits to perform a lookup into a table b is little-endian: b[0] is LSB.

type TableConstant = F

Auto Trait Implementations

impl<F> RefUnwindSafe for FpGadget<F> where
    F: RefUnwindSafe

impl<F> Send for FpGadget<F>

impl<F> Sync for FpGadget<F>

impl<F> Unpin for FpGadget<F> where
    F: Unpin

impl<F> UnwindSafe for FpGadget<F> where
    F: 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>,