Struct snarkvm_circuit_environment::helpers::Assignment
source · pub struct Assignment<F: PrimeField> { /* private fields */ }
Expand description
A struct for tracking the mapping of variables from the virtual machine (first) to the gadget constraint system (second).
Implementations
sourceimpl<F: PrimeField> Assignment<F>
impl<F: PrimeField> Assignment<F>
sourcepub fn public_inputs(&self) -> Vec<F>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn public_inputs(&self) -> Vec<F>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the public inputs of the assignment.
sourcepub fn num_public(&self) -> u64
pub fn num_public(&self) -> u64
Returns the number of public variables in the assignment.
sourcepub fn num_private(&self) -> u64
pub fn num_private(&self) -> u64
Returns the number of private variables in the assignment.
sourcepub fn num_constraints(&self) -> u64
pub fn num_constraints(&self) -> u64
Returns the number of constraints in the assignment.
Trait Implementations
sourceimpl<F: Clone + PrimeField> Clone for Assignment<F>
impl<F: Clone + PrimeField> Clone for Assignment<F>
sourcefn clone(&self) -> Assignment<F>
fn clone(&self) -> Assignment<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<F: PrimeField> ConstraintSynthesizer<F> for Assignment<F>
impl<F: PrimeField> ConstraintSynthesizer<F> for Assignment<F>
sourcefn generate_constraints<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS
) -> Result<(), SynthesisError>
fn generate_constraints<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS
) -> Result<(), SynthesisError>
Synthesizes the constraints from the environment into a snarkvm_r1cs
-compliant constraint system.
sourceimpl<F: PrimeField> From<R1CS<F>> for Assignment<F>
impl<F: PrimeField> From<R1CS<F>> for Assignment<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for Assignment<F>where
F: RefUnwindSafe,
impl<F> Send for Assignment<F>
impl<F> Sync for Assignment<F>
impl<F> Unpin for Assignment<F>where
F: Unpin,
impl<F> UnwindSafe for Assignment<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more