pub struct Assignment<F>where
F: PrimeField,{ /* private fields */ }
Expand description
A struct that contains public variable assignments, private variable assignments, and constraint assignments.
Implementations§
Source§impl<F> Assignment<F>where
F: PrimeField,
impl<F> Assignment<F>where
F: PrimeField,
Sourcepub const fn public_inputs(&self) -> &Arc<[Variable<F>]>
pub const fn public_inputs(&self) -> &Arc<[Variable<F>]>
Returns the public inputs of the assignment.
Sourcepub const fn private_inputs(&self) -> &Arc<[Variable<F>]>
pub const fn private_inputs(&self) -> &Arc<[Variable<F>]>
Returns the private inputs of the assignment.
Sourcepub const fn constraints(&self) -> &Arc<[Arc<Constraint<F>>]>
pub const fn constraints(&self) -> &Arc<[Arc<Constraint<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_variables(&self) -> u64
pub fn num_variables(&self) -> u64
Returns the number of constants, public, and 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 for Assignment<F>where
F: Clone + PrimeField,
impl<F> Clone for Assignment<F>where
F: Clone + PrimeField,
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> ConstraintSynthesizer<F> for Assignment<F>where
F: PrimeField,
impl<F> ConstraintSynthesizer<F> for Assignment<F>where
F: PrimeField,
Source§fn 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_algorithms::r1cs
-compliant constraint system.
Source§impl<F> Debug for Assignment<F>where
F: Debug + PrimeField,
impl<F> Debug for Assignment<F>where
F: Debug + PrimeField,
Source§impl<F> From<R1CS<F>> for Assignment<F>where
F: PrimeField,
impl<F> From<R1CS<F>> for Assignment<F>where
F: PrimeField,
Source§fn from(r1cs: R1CS<F>) -> Assignment<F>
fn from(r1cs: R1CS<F>) -> Assignment<F>
Converts an R1CS to an assignment.
Auto Trait Implementations§
impl<F> Freeze for Assignment<F>
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>
impl<F> UnwindSafe for Assignment<F>where
F: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more