Struct snarkvm_wasm::marlin_pc::commitment::labeled_commitment::LabeledCommitmentVar [−][src]
pub struct LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, { pub label: String, pub commitment: CommitmentVar<TargetCurve, BaseCurve, PG>, pub degree_bound: Option<FpGadget<<BaseCurve as PairingEngine>::Fr>>, }
Expand description
Gadget for a Marlin-KZG10 commitment, with a string label and degree bound.
Fields
label: StringA text label for the commitment.
commitment: CommitmentVar<TargetCurve, BaseCurve, PG>The plain commitment.
degree_bound: Option<FpGadget<<BaseCurve as PairingEngine>::Fr>>Optionally, a bound on the polynomial degree.
Trait Implementations
impl<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]
impl<TargetCurve, BaseCurve, PG> AllocGadget<LabeledCommitment<Commitment<TargetCurve>>, <BaseCurve as PairingEngine>::Fr> for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]pub fn alloc_constant<Fn, T, CS>(
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>, [src]
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>,
pub fn alloc<Fn, T, CS>(
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>, [src]
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>,
pub fn alloc_input<Fn, T, CS>(
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>, [src]
cs: CS,
value_gen: Fn
) -> Result<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>,
T: Borrow<LabeledCommitment<Commitment<TargetCurve>>>,
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]
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
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]
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
impl<TargetCurve, BaseCurve, PG> Clone for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]
impl<TargetCurve, BaseCurve, PG> Clone for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]pub fn clone(&self) -> LabeledCommitmentVar<TargetCurve, BaseCurve, PG>[src]
pub fn clone(&self) -> LabeledCommitmentVar<TargetCurve, BaseCurve, PG>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<TargetCurve, BaseCurve, PG> PrepareGadget<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, <BaseCurve as PairingEngine>::Fr> for PreparedLabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]
impl<TargetCurve, BaseCurve, PG> PrepareGadget<LabeledCommitmentVar<TargetCurve, BaseCurve, PG>, <BaseCurve as PairingEngine>::Fr> for PreparedLabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, [src]pub fn prepare<CS>(
cs: CS,
unprepared: &LabeledCommitmentVar<TargetCurve, BaseCurve, PG>
) -> Result<PreparedLabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>, [src]
pub fn prepare<CS>(
cs: CS,
unprepared: &LabeledCommitmentVar<TargetCurve, BaseCurve, PG>
) -> Result<PreparedLabeledCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError> where
CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>, [src]Prepare from an unprepared element.
Auto Trait Implementations
impl<TargetCurve, BaseCurve, PG> RefUnwindSafe for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
<BaseCurve as PairingEngine>::Fr: RefUnwindSafe,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: RefUnwindSafe,
<BaseCurve as PairingEngine>::Fr: RefUnwindSafe,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: RefUnwindSafe,
impl<TargetCurve, BaseCurve, PG> Send for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Send,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Send,
impl<TargetCurve, BaseCurve, PG> Sync for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Sync,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Sync,
impl<TargetCurve, BaseCurve, PG> Unpin for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
<BaseCurve as PairingEngine>::Fr: Unpin,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Unpin,
<BaseCurve as PairingEngine>::Fr: Unpin,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Unpin,
impl<TargetCurve, BaseCurve, PG> UnwindSafe for LabeledCommitmentVar<TargetCurve, BaseCurve, PG> where
<BaseCurve as PairingEngine>::Fr: UnwindSafe,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: UnwindSafe,
<BaseCurve as PairingEngine>::Fr: UnwindSafe,
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,