Trait snarkvm_gadgets::traits::alloc::AllocGadget [−][src]
pub trait AllocGadget<V: ?Sized, F: Field>: Sized { fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>; fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>; fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
_cs: CS,
_f: Fn
) -> Result<Self, SynthesisError> { ... } fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError> { ... } fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError> { ... } }
Required methods
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
Provided methods
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
_cs: CS,
_f: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
Implementations on Foreign Types
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<[I]>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<[I]>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<[I]>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<[I]>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
Implementors
impl<C, H, CGadget, HGadget, F> AllocGadget<CommitmentMerklePath<C, H>, F> for CommitmentMerklePathGadget<C, H, CGadget, HGadget, F> where
C: CommitmentScheme,
H: CRH,
CGadget: CommitmentGadget<C, F>,
HGadget: CRHGadget<H, F>,
F: Field,
impl<F, CF> AllocGadget<Vec<F, Global>, CF> for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
impl<F: PrimeField, CF: PrimeField> AllocGadget<Vec<F, Global>, CF> for BooleanInputGadget<F, CF>
impl<G: Group + ProjectiveCurve, F: Field> AllocGadget<GroupEncryptionParameters<G>, F> for GroupEncryptionParametersGadget<G>
impl<G: Group + ProjectiveCurve, F: Field, GG: CompressedGroupGadget<G, F>> AllocGadget<Vec<G, Global>, F> for GroupEncryptionCiphertextGadget<G, F, GG>
impl<G: Group + ProjectiveCurve, F: Field, GG: GroupGadget<G, F>> AllocGadget<Vec<G, Global>, F> for GroupEncryptionPlaintextGadget<G, F, GG>
impl<G: Group + ProjectiveCurve, F: Field, GG: GroupGadget<G, F>> AllocGadget<GroupEncryptionPublicKey<G>, F> for GroupEncryptionPublicKeyGadget<G, F, GG>
impl<G: Group + CanonicalSerialize + CanonicalDeserialize, F: Field, GG: GroupGadget<G, F>> AllocGadget<SchnorrPublicKey<G>, F> for SchnorrPublicKeyGadget<G, F, GG>
impl<G: Group, F: Field, D: Digest> AllocGadget<SchnorrParameters<G, D>, F> for SchnorrParametersGadget<G, F, D>
impl<G: Group, F: PrimeField> AllocGadget<<G as Group>::ScalarField, F> for PedersenRandomnessGadget<G>
impl<G: Group, F: PrimeField> AllocGadget<<G as Group>::ScalarField, F> for GroupEncryptionPrivateKeyGadget<G>
impl<G: Group, F: PrimeField> AllocGadget<<G as Group>::ScalarField, F> for GroupEncryptionRandomnessGadget<G>
impl<G: Group, F: PrimeField> AllocGadget<Vec<<G as Group>::ScalarField, Global>, F> for GroupEncryptionBlindingExponentsGadget<G>
impl<G: Group, S: PedersenSize, F: Field, GG: GroupGadget<G, F>> AllocGadget<PedersenCRHParameters<G, S>, F> for PedersenCRHParametersGadget<G, S, F, GG>
impl<G: Group, S: PedersenSize, F: PrimeField> AllocGadget<PedersenCommitmentParameters<G, S>, F> for PedersenCommitmentParametersGadget<G, S, F>
impl<P, F: PrimeField> AllocGadget<Fp6<P>, F> for Fp6Gadget<P, F> where
P: Fp6Parameters,
P::Fp2Params: Fp2Parameters<Fp = F>,
impl<P, F: PrimeField> AllocGadget<Fp12<P>, F> for Fp12Gadget<P, F> where
P: Fp12Parameters,
<P::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters<Fp = F>,
impl<P, HGadget, F> AllocGadget<MerklePath<P>, F> for MerklePathGadget<P, HGadget, F> where
P: MerkleParameters,
HGadget: CRHGadget<P::H, F>,
F: Field,
impl<P: Bls12Parameters> AllocGadget<G2Prepared<P>, <P as Bls12Parameters>::Fp> for G2PreparedGadget<P>
impl<P: MontgomeryModelParameters, F: PrimeField> AllocGadget<<P as ModelParameters>::BaseField, F> for Elligator2FieldGadget<P, F>
impl<P: SWModelParameters, F: PrimeField, FG: FieldGadget<P::BaseField, F>> AllocGadget<GroupProjective<P>, F> for snarkvm_gadgets::curves::templates::bls12::affine::AffineGadget<P, F, FG>
impl<P: TEModelParameters, F: Field, FG: FieldGadget<P::BaseField, F>> AllocGadget<GroupAffine<P>, F> for snarkvm_gadgets::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
Self: GroupGadget<TEAffine<P>, F>,
impl<P: TEModelParameters, F: Field, FG: FieldGadget<P::BaseField, F>> AllocGadget<GroupProjective<P>, F> for snarkvm_gadgets::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
Self: GroupGadget<TEProjective<P>, F>,
impl<Pairing: PairingEngine, F: Field, P: PairingGadget<Pairing, F>> AllocGadget<Proof<Pairing>, F> for GM17ProofGadget<Pairing, F, P>
impl<Pairing: PairingEngine, F: Field, P: PairingGadget<Pairing, F>> AllocGadget<VerifyingKey<Pairing>, F> for GM17VerifyingKeyGadget<Pairing, F, P>
impl<PairingE, ConstraintF, P> AllocGadget<Proof<PairingE>, ConstraintF> for ProofGadget<PairingE, ConstraintF, P> where
PairingE: PairingEngine,
ConstraintF: Field,
P: PairingGadget<PairingE, ConstraintF>,
impl<PairingE, ConstraintF, P> AllocGadget<VerifyingKey<PairingE>, ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
PairingE: PairingEngine,
ConstraintF: Field,
P: PairingGadget<PairingE, ConstraintF>,
impl<TargetField: PrimeField, BaseField: PrimeField> AllocGadget<TargetField, BaseField> for NonNativeFieldVar<TargetField, BaseField>
impl<TargetField: PrimeField, BaseField: PrimeField> AllocGadget<TargetField, BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField>