Struct snarkvm_circuit::Assignment
source · pub struct Assignment<F>where
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> Assignment<F>where
F: PrimeField,
impl<F> Assignment<F>where
F: PrimeField,
sourcepub fn public_inputs(&self) -> Vec<F, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn public_inputs(&self) -> Vec<F, Global>ⓘ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 for Assignment<F>where
F: Clone + PrimeField,
impl<F> Clone for Assignment<F>where
F: Clone + PrimeField,
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> ConstraintSynthesizer<F> for Assignment<F>where
F: PrimeField,
impl<F> ConstraintSynthesizer<F> for Assignment<F>where
F: PrimeField,
sourcefn generate_constraints<CS>(&self, cs: &mut CS) -> Result<(), SynthesisError>where
CS: ConstraintSystem<F>,
fn generate_constraints<CS>(&self, cs: &mut CS) -> Result<(), SynthesisError>where
CS: ConstraintSystem<F>,
Synthesizes the constraints from the environment into a snarkvm_r1cs
-compliant constraint system.
sourceimpl<F> From<R1CS<F>> for Assignment<F>where
F: PrimeField,
impl<F> From<R1CS<F>> for Assignment<F>where
F: PrimeField,
sourcefn from(r1cs: R1CS<F>) -> Assignment<F>
fn from(r1cs: R1CS<F>) -> Assignment<F>
Converts an R1CS to an assignment.
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