Struct snarkvm_circuit_environment::helpers::Assignment
source · pub struct Assignment<F: PrimeField> { /* private fields */ }
Expand description
A struct that contains public variable assignments, private variable assignments, and constraint assignments.
Implementations§
source§impl<F: PrimeField> Assignment<F>
impl<F: PrimeField> Assignment<F>
sourcepub const fn public_inputs(&self) -> &IndexMap<Index, F>
pub const fn public_inputs(&self) -> &IndexMap<Index, F>
Returns the public inputs of the assignment.
sourcepub const fn private_inputs(&self) -> &IndexMap<Index, F>
pub const fn private_inputs(&self) -> &IndexMap<Index, F>
Returns the private inputs of the assignment.
sourcepub const fn constraints(
&self
) -> &Vec<(AssignmentLC<F>, AssignmentLC<F>, AssignmentLC<F>)>
pub const fn constraints( &self ) -> &Vec<(AssignmentLC<F>, AssignmentLC<F>, AssignmentLC<F>)>
Returns the constraints 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.
sourcepub fn num_nonzeros(&self) -> (u64, u64, u64)
pub fn num_nonzeros(&self) -> (u64, u64, u64)
Returns the number of nonzeros in the assignment.
Trait Implementations§
source§impl<F: Clone + PrimeField> Clone for Assignment<F>
impl<F: Clone + PrimeField> Clone for Assignment<F>
source§fn clone(&self) -> Assignment<F>
fn clone(&self) -> Assignment<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F: PrimeField> ConstraintSynthesizer<F> for Assignment<F>
impl<F: PrimeField> ConstraintSynthesizer<F> for Assignment<F>
source§fn 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_algorithms::r1cs
-compliant constraint system.
source§impl<F: Debug + PrimeField> Debug for Assignment<F>
impl<F: Debug + PrimeField> Debug for Assignment<F>
source§impl<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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more