pub struct Circuit;

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Synthesizes the constraints from the environment into a snarkvm_r1cs-compliant constraint system.

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Returns the zero constant.

Returns the one constant.

Returns a new variable of the given mode and value.

Returns a new witness of the given mode and value.

Enters a new scope for the environment.

Adds one constraint enforcing that (A * B) == C.

Returns true if all constraints in the environment are satisfied.

Returns true if all constraints in the current scope are satisfied.

Returns the number of constants in the entire circuit.

Returns the number of public variables in the entire circuit.

Returns the number of private variables in the entire circuit.

Returns the number of constraints in the entire circuit.

Returns the number of gates in the entire circuit.

Returns the number of constants for the current scope.

Returns the number of public variables for the current scope.

Returns the number of private variables for the current scope.

Returns the number of constraints for the current scope.

Returns the number of gates for the current scope.

Halts the program from further synthesis, evaluation, and execution in the current environment.

TODO (howardwu): Abstraction - Refactor this into an appropriate design. Circuits should not have easy access to this during synthesis. Returns the R1CS circuit, resetting the circuit.

TODO (howardwu): Abstraction - Refactor this into an appropriate design. Circuits should not have easy access to this during synthesis. Returns the R1CS circuit, resetting the circuit.

TODO (howardwu): Abstraction - Refactor this into an appropriate design. Circuits should not have easy access to this during synthesis. Returns the R1CS assignment of the circuit, resetting the circuit.

Clears the circuit and initializes an empty environment.

The coefficient A of the twisted Edwards curve.
The coefficient D of the twisted Edwards curve.
The coefficient A of the Montgomery curve.
The coefficient B of the Montgomery curve.
The maximum number of bytes allowed in a string.
Adds one constraint enforcing that the given boolean is true.
Adds one constraint enforcing that the A == B.
Adds one constraint enforcing that the A != B.
Returns a tuple containing the number of constants, public variables, private variables, constraints, and gates in the entire environment.
Returns a tuple containing the number of constants, public variables, private variables, constraints, and gates for the current scope.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.