pub trait Argument<F: PrimeField> {
const ARGUMENT_TYPE: ArgumentType;
const CONSTRAINTS: u32;
// Required method
fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>(
env: &ArgumentEnv<F, T>,
cache: &mut Cache
) -> Vec<T>;
// Provided methods
fn constraints(cache: &mut Cache) -> Vec<E<F>> { ... }
fn combined_constraints(alphas: &Alphas<F>, cache: &mut Cache) -> E<F> { ... }
}
Expand description
The interface for a minimal argument implementation.
Required Associated Constants§
sourceconst ARGUMENT_TYPE: ArgumentType
const ARGUMENT_TYPE: ArgumentType
The type of constraints that this will produce. This is important to enforce that we don’t combine the constraints with powers of alpha that collide with other mutually inclusive arguments.
sourceconst CONSTRAINTS: u32
const CONSTRAINTS: u32
The number of constraints created by the argument.
Required Methods§
sourcefn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>(
env: &ArgumentEnv<F, T>,
cache: &mut Cache
) -> Vec<T>
fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>( env: &ArgumentEnv<F, T>, cache: &mut Cache ) -> Vec<T>
Constraints for this argument
Provided Methods§
sourcefn constraints(cache: &mut Cache) -> Vec<E<F>>
fn constraints(cache: &mut Cache) -> Vec<E<F>>
Returns the set of constraints required to prove this argument.
sourcefn combined_constraints(alphas: &Alphas<F>, cache: &mut Cache) -> E<F>
fn combined_constraints(alphas: &Alphas<F>, cache: &mut Cache) -> E<F>
Returns constraints safely combined via the passed combinator.