Trait snarkvm_wasm::traits::utilities::alloc::AllocGadget[][src]

pub trait AllocGadget<V, F> where
    F: Field,
    V: ?Sized
{ pub fn alloc<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError>
    where
        Fn: FnOnce() -> Result<T, SynthesisError>,
        CS: ConstraintSystem<F>,
        T: Borrow<V>
;
pub fn alloc_input<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError>
    where
        Fn: FnOnce() -> Result<T, SynthesisError>,
        CS: ConstraintSystem<F>,
        T: Borrow<V>
; pub fn alloc_constant<Fn, T, CS>(
        _cs: CS,
        _f: Fn
    ) -> Result<Self, SynthesisError>
    where
        Fn: FnOnce() -> Result<T, SynthesisError>,
        CS: ConstraintSystem<F>,
        T: Borrow<V>
, { ... }
pub fn alloc_checked<Fn, T, CS>(
        cs: CS,
        f: Fn
    ) -> Result<Self, SynthesisError>
    where
        Fn: FnOnce() -> Result<T, SynthesisError>,
        CS: ConstraintSystem<F>,
        T: Borrow<V>
, { ... }
pub fn alloc_input_checked<Fn, T, CS>(
        cs: CS,
        f: Fn
    ) -> Result<Self, SynthesisError>
    where
        Fn: FnOnce() -> Result<T, SynthesisError>,
        CS: ConstraintSystem<F>,
        T: Borrow<V>
, { ... } }

Required methods

pub fn alloc<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
    Fn: FnOnce() -> Result<T, SynthesisError>,
    CS: ConstraintSystem<F>,
    T: Borrow<V>, 
[src]

pub fn alloc_input<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
    Fn: FnOnce() -> Result<T, SynthesisError>,
    CS: ConstraintSystem<F>,
    T: Borrow<V>, 
[src]

Loading content...

Provided methods

pub fn alloc_constant<Fn, T, CS>(
    _cs: CS,
    _f: Fn
) -> Result<Self, SynthesisError> where
    Fn: FnOnce() -> Result<T, SynthesisError>,
    CS: ConstraintSystem<F>,
    T: Borrow<V>, 
[src]

pub fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
    Fn: FnOnce() -> Result<T, SynthesisError>,
    CS: ConstraintSystem<F>,
    T: Borrow<V>, 
[src]

pub fn alloc_input_checked<Fn, T, CS>(
    cs: CS,
    f: Fn
) -> Result<Self, SynthesisError> where
    Fn: FnOnce() -> Result<T, SynthesisError>,
    CS: ConstraintSystem<F>,
    T: Borrow<V>, 
[src]

Loading content...

Implementations on Foreign Types

impl<I, F, A> AllocGadget<[I], F> for Vec<A, Global> where
    A: AllocGadget<I, F>,
    F: Field
[src]

Loading content...

Implementors

impl<C, H, CGadget, HGadget, F> AllocGadget<CommitmentMerklePath<C, H>, F> for CommitmentMerklePathGadget<C, H, CGadget, HGadget, F> where
    C: CommitmentScheme,
    H: CRH,
    F: Field,
    CGadget: CommitmentGadget<C, F>,
    HGadget: CRHGadget<H, F>, 
[src]

impl<F> AllocGadget<<Int8 as Integer>::IntegerType, F> for Int8 where
    F: Field
[src]

impl<F> AllocGadget<<Int16 as Integer>::IntegerType, F> for Int16 where
    F: Field
[src]

impl<F> AllocGadget<<Int32 as Integer>::IntegerType, F> for Int32 where
    F: Field
[src]

impl<F> AllocGadget<<Int64 as Integer>::IntegerType, F> for Int64 where
    F: Field
[src]

impl<F> AllocGadget<<Int128 as Integer>::IntegerType, F> for Int128 where
    F: Field
[src]

impl<F> AllocGadget<<UInt8 as Integer>::IntegerType, F> for UInt8 where
    F: Field
[src]

impl<F> AllocGadget<<UInt16 as Integer>::IntegerType, F> for UInt16 where
    F: Field
[src]

impl<F> AllocGadget<<UInt32 as Integer>::IntegerType, F> for UInt32 where
    F: Field
[src]

impl<F> AllocGadget<<UInt64 as Integer>::IntegerType, F> for UInt64 where
    F: Field
[src]

impl<F> AllocGadget<<UInt128 as Integer>::IntegerType, F> for UInt128 where
    F: Field
[src]

impl<F> AllocGadget<[u8; 32], F> for Blake2sRandomnessGadget where
    F: PrimeField
[src]

impl<F> AllocGadget<[u8; 32], F> for Blake2sOutputGadget where
    F: PrimeField
[src]

impl<F> AllocGadget<bool, F> for Boolean where
    F: Field
[src]

impl<F> AllocGadget<bool, F> for AllocatedBit where
    F: Field
[src]

impl<F> AllocGadget<(), F> for Blake2sParametersGadget where
    F: Field
[src]

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

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

impl<G, F> AllocGadget<<G as Group>::ScalarField, F> for PedersenRandomnessGadget<G> where
    G: Group,
    F: PrimeField
[src]

impl<G, F> AllocGadget<<G as Group>::ScalarField, F> for GroupEncryptionPrivateKeyGadget<G> where
    G: Group,
    F: PrimeField
[src]

impl<G, F> AllocGadget<<G as Group>::ScalarField, F> for GroupEncryptionRandomnessGadget<G> where
    G: Group,
    F: PrimeField
[src]

impl<G, F> AllocGadget<GroupEncryptionParameters<G>, F> for GroupEncryptionParametersGadget<G> where
    G: Group + ProjectiveCurve,
    F: Field
[src]

impl<G, F> AllocGadget<Vec<<G as Group>::ScalarField, Global>, F> for GroupEncryptionBlindingExponentsGadget<G> where
    G: Group,
    F: PrimeField
[src]

impl<G, F, D> AllocGadget<SchnorrParameters<G, D>, F> for SchnorrParametersGadget<G, F, D> where
    G: Group,
    D: Digest,
    F: Field
[src]

impl<G, F, GG> AllocGadget<GroupEncryptionPublicKey<G>, F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
    G: Group + ProjectiveCurve,
    F: Field,
    GG: GroupGadget<G, F>, 
[src]

impl<G, F, GG> AllocGadget<SchnorrPublicKey<G>, F> for SchnorrPublicKeyGadget<G, F, GG> where
    G: Group + CanonicalSerialize + CanonicalDeserialize,
    F: Field,
    GG: GroupGadget<G, F>, 
[src]

impl<G, F, GG> AllocGadget<Vec<G, Global>, F> for GroupEncryptionCiphertextGadget<G, F, GG> where
    G: Group + ProjectiveCurve,
    F: Field,
    GG: CompressedGroupGadget<G, F>, 
[src]

impl<G, F, GG> AllocGadget<Vec<G, Global>, F> for GroupEncryptionPlaintextGadget<G, F, GG> where
    G: Group + ProjectiveCurve,
    F: Field,
    GG: GroupGadget<G, F>, 
[src]

impl<G, S, F> AllocGadget<PedersenCommitmentParameters<G, S>, F> for PedersenCommitmentParametersGadget<G, S, F> where
    G: Group,
    S: PedersenSize,
    F: PrimeField
[src]

impl<G, S, F, GG> AllocGadget<PedersenCRHParameters<G, S>, F> for PedersenCRHParametersGadget<G, S, F, GG> where
    G: Group,
    S: PedersenSize,
    F: Field,
    GG: GroupGadget<G, F>, 
[src]

impl<P, F> AllocGadget<<P as ModelParameters>::BaseField, F> for Elligator2FieldGadget<P, F> where
    P: MontgomeryModelParameters,
    F: PrimeField
[src]

impl<P, F> AllocGadget<Fp6<P>, F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

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

impl<P, F> AllocGadget<Fp12<P>, 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, 
[src]

impl<P, F, FG> AllocGadget<GroupProjective<P>, F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
    P: SWModelParameters,
    F: PrimeField,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>, 
[src]

impl<P, F, FG> AllocGadget<GroupAffine<P>, F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
    P: TEModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>,
    AffineGadget<P, F, FG>: GroupGadget<GroupAffine<P>, F>, 
[src]

impl<P, F, FG> AllocGadget<GroupProjective<P>, F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
    P: TEModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>,
    AffineGadget<P, F, FG>: GroupGadget<GroupProjective<P>, F>, 
[src]

impl<P, HGadget, F> AllocGadget<MerklePath<P>, F> for MerklePathGadget<P, HGadget, F> where
    P: MerkleParameters,
    F: Field,
    HGadget: CRHGadget<<P as MerkleParameters>::H, F>, 
[src]

impl<Pairing, F, P> AllocGadget<Proof<Pairing>, F> for GM17ProofGadget<Pairing, F, P> where
    P: PairingGadget<Pairing, F>,
    F: Field,
    Pairing: PairingEngine
[src]

impl<Pairing, F, P> AllocGadget<VerifyingKey<Pairing>, F> for GM17VerifyingKeyGadget<Pairing, F, P> where
    P: PairingGadget<Pairing, F>,
    F: Field,
    Pairing: PairingEngine
[src]

impl<PairingE, ConstraintF, P> AllocGadget<Proof<PairingE>, ConstraintF> for ProofGadget<PairingE, ConstraintF, P> where
    P: PairingGadget<PairingE, ConstraintF>,
    PairingE: PairingEngine,
    ConstraintF: Field
[src]

impl<PairingE, ConstraintF, P> AllocGadget<VerifyingKey<PairingE>, ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
    P: PairingGadget<PairingE, ConstraintF>,
    PairingE: PairingEngine,
    ConstraintF: Field
[src]

Loading content...