Trait bellman::PublicConstraintSystem
[−]
[src]
pub trait PublicConstraintSystem<E: Engine>: ConstraintSystem<E> { type PublicRoot: PublicConstraintSystem<E, Variable = Self::Variable>; fn alloc_input<F, A, AR>(
&mut self,
annotation: A,
f: F
) -> Result<Self::Variable, SynthesisError>
where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: Into<String>; fn get_public_root(&mut self) -> &mut Self::PublicRoot; fn namespace_public<'a, NR, N>(
&'a mut self,
name_fn: N
) -> Namespace<'a, E, Self::PublicRoot>
where
NR: Into<String>,
N: FnOnce() -> NR, { ... } }
Associated Types
type PublicRoot: PublicConstraintSystem<E, Variable = Self::Variable>
Represents the type of the "root" of this constraint system so that nested namespaces can minimize indirection.
Required Methods
fn alloc_input<F, A, AR>(
&mut self,
annotation: A,
f: F
) -> Result<Self::Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: Into<String>,
&mut self,
annotation: A,
f: F
) -> Result<Self::Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: Into<String>,
Allocate a public variable in the constraint system. The provided function is used to determine the assignment of the variable.
fn get_public_root(&mut self) -> &mut Self::PublicRoot
Gets the "root" constraint system, bypassing the namespacing.
Not intended for downstream use; use namespace
instead.
Provided Methods
fn namespace_public<'a, NR, N>(
&'a mut self,
name_fn: N
) -> Namespace<'a, E, Self::PublicRoot> where
NR: Into<String>,
N: FnOnce() -> NR,
&'a mut self,
name_fn: N
) -> Namespace<'a, E, Self::PublicRoot> where
NR: Into<String>,
N: FnOnce() -> NR,
Begin a namespace for this constraint system.
Implementations on Foreign Types
impl<'cs, E: Engine, CS: PublicConstraintSystem<E>> PublicConstraintSystem<E> for &'cs mut CS
[src]
Convenience implementation of PublicConstraintSystem
type PublicRoot = CS::PublicRoot
fn alloc_input<F, A, AR>(
&mut self,
annotation: A,
f: F
) -> Result<Self::Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: Into<String>,
[src]
&mut self,
annotation: A,
f: F
) -> Result<Self::Variable, SynthesisError> where
F: FnOnce() -> Result<E::Fr, SynthesisError>,
A: FnOnce() -> AR,
AR: Into<String>,
fn get_public_root(&mut self) -> &mut Self::PublicRoot
[src]
fn namespace_public<'a, NR, N>(
&'a mut self,
name_fn: N
) -> Namespace<'a, E, Self::PublicRoot> where
NR: Into<String>,
N: FnOnce() -> NR,
[src]
&'a mut self,
name_fn: N
) -> Namespace<'a, E, Self::PublicRoot> where
NR: Into<String>,
N: FnOnce() -> NR,
Implementors
impl<'cs, E: Engine, CS: PublicConstraintSystem<E>> PublicConstraintSystem<E> for Namespace<'cs, E, CS> type PublicRoot = CS::PublicRoot;