pub trait ColAccessCap<F: PrimeField, CIx: ColumnIndexer> {
    type Variable: Clone + Add<Self::Variable, Output = Self::Variable> + Sub<Self::Variable, Output = Self::Variable> + Mul<Self::Variable, Output = Self::Variable> + Neg<Output = Self::Variable> + From<u64> + Debug + 'static;

    // Required methods
    fn assert_zero(&mut self, cst: Self::Variable);
    fn set_assert_mapper(
        &mut self,
        mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>
    );
    fn read_column(&self, col: CIx) -> Self::Variable;
    fn constant(value: F) -> Self::Variable;
}
Expand description

Environment capability for accessing and reading columns. This is necessary for building constraints.

Required Associated Types§

source

type Variable: Clone + Add<Self::Variable, Output = Self::Variable> + Sub<Self::Variable, Output = Self::Variable> + Mul<Self::Variable, Output = Self::Variable> + Neg<Output = Self::Variable> + From<u64> + Debug + 'static

Required Methods§

source

fn assert_zero(&mut self, cst: Self::Variable)

Asserts that the value is zero.

source

fn set_assert_mapper( &mut self, mapper: Box<dyn Fn(Self::Variable) -> Self::Variable> )

Sets an assert predicate f(X) such that when assert_zero is called on x, it will actually perform assert_zero(f(x)).

source

fn read_column(&self, col: CIx) -> Self::Variable

Reads value from a column position.

source

fn constant(value: F) -> Self::Variable

Turns a constant value into a variable.

Implementors§

source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer, CIx2: ColumnIndexer, Env1: ColAccessCap<F, CIx1>, L: MPrism<Source = CIx1, Target = CIx2>> ColAccessCap<F, CIx2> for SubEnvColumn<'a, F, CIx1, Env1, L>

§

type Variable = <Env1 as ColAccessCap<F, CIx1>>::Variable

source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer, Env1: ColAccessCap<F, CIx1>, L> ColAccessCap<F, CIx1> for SubEnvLookup<'a, F, CIx1, Env1, L>

§

type Variable = <Env1 as ColAccessCap<F, CIx1>>::Variable

source§

impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> ColAccessCap<F, CIx> for ConstraintBuilderEnv<F, LT>

source§

impl<F: PrimeField, CIx: ColumnIndexer, const N_WIT: usize, const N_REL: usize, const N_DSEL: usize, const N_FSEL: usize, LT: LookupTableID> ColAccessCap<F, CIx> for WitnessBuilderEnv<F, CIx, N_WIT, N_REL, N_DSEL, N_FSEL, LT>

§

type Variable = F