Struct snarkvm_algorithms::snark::groth16::ProvingAssignment
source · [−]pub struct ProvingAssignment<E: PairingEngine> { /* private fields */ }
Trait Implementations
sourceimpl<E: PairingEngine> ConstraintSystem<<E as PairingEngine>::Fr> for ProvingAssignment<E>
impl<E: PairingEngine> ConstraintSystem<<E as PairingEngine>::Fr> for ProvingAssignment<E>
type Root = Self
type Root = Self
Represents the type of the “root” of this constraint system so that nested namespaces can minimize indirection. Read more
sourcefn alloc<F, A, AR>(&mut self, _: A, f: F) -> Result<Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: AsRef<str>,
fn alloc<F, A, AR>(&mut self, _: A, f: F) -> Result<Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: AsRef<str>,
Allocate a private variable in the constraint system. The provided
function is used to determine the assignment of the variable. The
given annotation
function is invoked in testing contexts in order
to derive a unique name for this variable in the current namespace. Read more
sourcefn alloc_input<F, A, AR>(
&mut self,
_: A,
f: F
) -> Result<Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: AsRef<str>,
fn alloc_input<F, A, AR>(
&mut self,
_: A,
f: F
) -> Result<Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: AsRef<str>,
Allocate a public variable in the constraint system. The provided function is used to determine the assignment of the variable. Read more
sourcefn enforce<A, AR, LA, LB, LC>(&mut self, _: A, a: LA, b: LB, c: LC) where
A: FnOnce() -> AR,
AR: AsRef<str>,
LA: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
LB: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
LC: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
fn enforce<A, AR, LA, LB, LC>(&mut self, _: A, a: LA, b: LB, c: LC) where
A: FnOnce() -> AR,
AR: AsRef<str>,
LA: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
LB: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
LC: FnOnce(LinearCombination<E::Fr>) -> LinearCombination<E::Fr>,
Enforce that A
* B
= C
. The annotation
function is invoked in
testing contexts in order to derive a unique name for the constraint
in the current namespace. Read more
sourcefn push_namespace<NR, N>(&mut self, _: N) where
NR: AsRef<str>,
N: FnOnce() -> NR,
fn push_namespace<NR, N>(&mut self, _: N) where
NR: AsRef<str>,
N: FnOnce() -> NR,
Create a new (sub)namespace and enter into it. Not intended
for downstream use; use namespace
instead. Read more
sourcefn pop_namespace(&mut self)
fn pop_namespace(&mut self)
Exit out of the existing namespace. Not intended for
downstream use; use namespace
instead. Read more
sourcefn get_root(&mut self) -> &mut Self::Root
fn get_root(&mut self) -> &mut Self::Root
Gets the “root” constraint system, bypassing the namespacing.
Not intended for downstream use; use namespace
instead. Read more
sourcefn num_constraints(&self) -> usize
fn num_constraints(&self) -> usize
Output the number of constraints in the system.
sourcefn num_public_variables(&self) -> usize
fn num_public_variables(&self) -> usize
Output the number of public input variables to the system.
sourcefn num_private_variables(&self) -> usize
fn num_private_variables(&self) -> usize
Output the number of private input variables to the system.
sourcefn is_in_setup_mode(&self) -> bool
fn is_in_setup_mode(&self) -> bool
Output whether the constraint system is in the setup mode.
Auto Trait Implementations
impl<E> RefUnwindSafe for ProvingAssignment<E> where
<E as PairingEngine>::Fr: RefUnwindSafe,
impl<E> Send for ProvingAssignment<E>
impl<E> Sync for ProvingAssignment<E>
impl<E> Unpin for ProvingAssignment<E> where
<E as PairingEngine>::Fr: Unpin,
impl<E> UnwindSafe for ProvingAssignment<E> where
<E as PairingEngine>::Fr: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more