pub struct KeypairAssembly<E: Engine> {
pub num_inputs: usize,
pub num_aux: usize,
pub num_constraints: usize,
pub at_inputs: Vec<Vec<(E::Fr, usize)>>,
pub bt_inputs: Vec<Vec<(E::Fr, usize)>>,
pub ct_inputs: Vec<Vec<(E::Fr, usize)>>,
pub at_aux: Vec<Vec<(E::Fr, usize)>>,
pub bt_aux: Vec<Vec<(E::Fr, usize)>>,
pub ct_aux: Vec<Vec<(E::Fr, usize)>>,
}
Expand description
This is our assembly structure that we’ll use to synthesize the circuit into a QAP.
Fields§
§num_inputs: usize
§num_aux: usize
§num_constraints: usize
§at_inputs: Vec<Vec<(E::Fr, usize)>>
§bt_inputs: Vec<Vec<(E::Fr, usize)>>
§ct_inputs: Vec<Vec<(E::Fr, usize)>>
§at_aux: Vec<Vec<(E::Fr, usize)>>
§bt_aux: Vec<Vec<(E::Fr, usize)>>
§ct_aux: Vec<Vec<(E::Fr, usize)>>
Trait Implementations§
Source§impl<E: Engine> ConstraintSystem<E> for KeypairAssembly<E>
impl<E: Engine> ConstraintSystem<E> for KeypairAssembly<E>
Source§type Root = KeypairAssembly<E>
type Root = KeypairAssembly<E>
Represents the type of the “root” of this constraint system
so that nested namespaces can minimize indirection.
Source§fn alloc<F, A, AR>(&mut self, _: A, _: F) -> Result<Variable, SynthesisError>
fn alloc<F, A, AR>(&mut self, _: A, _: F) -> Result<Variable, SynthesisError>
Allocate a private variable in the constraint system. The provided function is used to
determine the assignment of the variable. The given
annotation
function is invoked
in testing contexts in order to derive a unique name for this variable in the current
namespace.Source§fn alloc_input<F, A, AR>(
&mut self,
_: A,
_: F,
) -> Result<Variable, SynthesisError>
fn alloc_input<F, A, AR>( &mut self, _: A, _: F, ) -> Result<Variable, SynthesisError>
Allocate a public variable in the constraint system. The provided function is used to
determine the assignment of the variable.
Source§fn enforce<A, AR, LA, LB, LC>(&mut self, _: A, a: LA, b: LB, c: LC)where
A: FnOnce() -> AR,
AR: Into<String>,
LA: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
LB: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
LC: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
fn enforce<A, AR, LA, LB, LC>(&mut self, _: A, a: LA, b: LB, c: LC)where
A: FnOnce() -> AR,
AR: Into<String>,
LA: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
LB: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
LC: FnOnce(LinearCombination<E>) -> LinearCombination<E>,
Enforce that
A
* B
= C
. The annotation
function is invoked in testing contexts
in order to derive a unique name for the constraint in the current namespace.Source§fn push_namespace<NR, N>(&mut self, _: N)
fn push_namespace<NR, N>(&mut self, _: N)
Create a new (sub)namespace and enter into it. Not intended
for downstream use; use
namespace
instead.Source§fn pop_namespace(&mut self)
fn pop_namespace(&mut self)
Exit out of the existing namespace. Not intended for
downstream use; use
namespace
instead.Auto Trait Implementations§
impl<E> Freeze for KeypairAssembly<E>
impl<E> RefUnwindSafe for KeypairAssembly<E>
impl<E> Send for KeypairAssembly<E>
impl<E> Sync for KeypairAssembly<E>
impl<E> Unpin for KeypairAssembly<E>
impl<E> UnwindSafe for KeypairAssembly<E>
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> 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