pub trait WitnessGeneration<F>where
    F: PrimeField,{
    // Required methods
    fn read_var(&self, var: &FieldVar<F>) -> F;
    fn constraints_counter(&self) -> usize;
}
Expand description

A witness generation environment. This is passed to any closure in RunState::compute so that they can access the witness generation environment.

Required Methods§

source

fn read_var(&self, var: &FieldVar<F>) -> F

Allows the caller to obtain the value behind a circuit variable.

source

fn constraints_counter(&self) -> usize

Trait Implementations§

source§

impl<F: PrimeField> WitnessGeneration<F> for &dyn WitnessGeneration<F>

source§

fn read_var(&self, var: &FieldVar<F>) -> F

Allows the caller to obtain the value behind a circuit variable.
source§

fn constraints_counter(&self) -> usize

Implementations on Foreign Types§

source§

impl<F: PrimeField, G: WitnessGeneration<F>> WitnessGeneration<F> for &G

source§

fn read_var(&self, var: &FieldVar<F>) -> F

source§

fn constraints_counter(&self) -> usize

Implementors§

source§

impl<F> WitnessGeneration<F> for RunState<F>where F: PrimeField,

source§

impl<F: PrimeField> WitnessGeneration<F> for &dyn WitnessGeneration<F>