Trait bellman::ConstraintSystem
[−]
[src]
pub trait ConstraintSystem<E: Engine> { fn alloc<NR, N, F>(&mut self, name_fn: N, f: F) -> Result<Variable, Error>
where
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce() -> Result<E::Fr, Error>; fn enforce<NR: Into<String>, N: FnOnce() -> NR>(
&mut self,
name_fn: N,
a: LinearCombination<E>,
b: LinearCombination<E>,
c: LinearCombination<E>
); fn one() -> Variable { ... } fn namespace<NR, N, R, F>(&mut self, _: N, space_fn: F) -> Result<R, Error>
where
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce(&mut Self) -> Result<R, Error>, { ... } }
Required Methods
fn alloc<NR, N, F>(&mut self, name_fn: N, f: F) -> Result<Variable, Error> where
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce() -> Result<E::Fr, Error>,
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce() -> Result<E::Fr, Error>,
Allocate a private variable in the constraint system. The provided function is used to determine the assignment of the variable.
fn enforce<NR: Into<String>, N: FnOnce() -> NR>(
&mut self,
name_fn: N,
a: LinearCombination<E>,
b: LinearCombination<E>,
c: LinearCombination<E>
)
&mut self,
name_fn: N,
a: LinearCombination<E>,
b: LinearCombination<E>,
c: LinearCombination<E>
)
Enforce that A
* B
= C
.
Provided Methods
fn one() -> Variable
Return the "one" input variable
fn namespace<NR, N, R, F>(&mut self, _: N, space_fn: F) -> Result<R, Error> where
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce(&mut Self) -> Result<R, Error>,
NR: Into<String>,
N: FnOnce() -> NR,
F: FnOnce(&mut Self) -> Result<R, Error>,
Begin a namespace for the constraint system
Implementors
impl<'a, E: Engine> ConstraintSystem<E> for VerifierInput<'a, E>
impl<E: Engine> ConstraintSystem<E> for TestConstraintSystem<E>