pub trait ColAccessCap<F: PrimeField, CIx: ColumnIndexer<usize>> {
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§
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§
Sourcefn assert_zero(&mut self, cst: Self::Variable)
fn assert_zero(&mut self, cst: Self::Variable)
Asserts that the value is zero.
Sourcefn set_assert_mapper(
&mut self,
mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>,
)
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))
.
Sourcefn read_column(&self, col: CIx) -> Self::Variable
fn read_column(&self, col: CIx) -> Self::Variable
Reads value from a column position.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.