pub struct ArithmeticCircuit<F: Field> {
pub num_constraints: usize,
pub num_variables: usize,
pub num_inputs: usize,
pub witness: Vec<F>,
}Expand description
Basic arithmetic circuit for ZKP
Fields§
§num_constraints: usizeNumber of constraints in the circuit
num_variables: usizeNumber of variables used in the circuit
num_inputs: usizeNumber of public inputs
witness: Vec<F>Private witness values
Implementations§
Source§impl<F: Field> ArithmeticCircuit<F>
impl<F: Field> ArithmeticCircuit<F>
Trait Implementations§
Source§impl<F: Clone + Field> Clone for ArithmeticCircuit<F>
impl<F: Clone + Field> Clone for ArithmeticCircuit<F>
Source§fn clone(&self) -> ArithmeticCircuit<F>
fn clone(&self) -> ArithmeticCircuit<F>
Returns a duplicate 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: Field> ConstraintSynthesizer<F> for ArithmeticCircuit<F>
impl<F: Field> ConstraintSynthesizer<F> for ArithmeticCircuit<F>
Source§fn generate_constraints(
self,
cs: ConstraintSystemRef<F>,
) -> Result<(), SynthesisError>
fn generate_constraints( self, cs: ConstraintSystemRef<F>, ) -> Result<(), SynthesisError>
Drives generation of new constraints inside
cs.Auto Trait Implementations§
impl<F> Freeze for ArithmeticCircuit<F>
impl<F> RefUnwindSafe for ArithmeticCircuit<F>where
F: RefUnwindSafe,
impl<F> Send for ArithmeticCircuit<F>
impl<F> Sync for ArithmeticCircuit<F>
impl<F> Unpin for ArithmeticCircuit<F>where
F: Unpin,
impl<F> UnwindSafe for ArithmeticCircuit<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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