pub trait AirBuilder: Sized {
type F: Field;
type Expr: AbstractField + From<Self::F> + Add<Self::Var, Output = Self::Expr> + Add<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr>;
type Var: Into<Self::Expr> + Copy + Send + Sync + Add<Self::F, Output = Self::Expr> + Add<Self::Var, Output = Self::Expr> + Add<Self::Expr, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::Expr, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::Expr, Output = Self::Expr>;
type M: Matrix<Self::Var>;
Show 15 methods
// Required methods
fn main(&self) -> Self::M;
fn is_first_row(&self) -> Self::Expr;
fn is_last_row(&self) -> Self::Expr;
fn is_transition_window(&self, size: usize) -> Self::Expr;
fn assert_zero<I: Into<Self::Expr>>(&mut self, x: I);
// Provided methods
fn is_transition(&self) -> Self::Expr { ... }
fn when<I: Into<Self::Expr>>(
&mut self,
condition: I,
) -> FilteredAirBuilder<'_, Self> { ... }
fn when_ne<I1: Into<Self::Expr>, I2: Into<Self::Expr>>(
&mut self,
x: I1,
y: I2,
) -> FilteredAirBuilder<'_, Self> { ... }
fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self> { ... }
fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self> { ... }
fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self> { ... }
fn when_transition_window(
&mut self,
size: usize,
) -> FilteredAirBuilder<'_, Self> { ... }
fn assert_one<I: Into<Self::Expr>>(&mut self, x: I) { ... }
fn assert_eq<I1: Into<Self::Expr>, I2: Into<Self::Expr>>(
&mut self,
x: I1,
y: I2,
) { ... }
fn assert_bool<I: Into<Self::Expr>>(&mut self, x: I) { ... }
}
Required Associated Types§
type F: Field
type Expr: AbstractField + From<Self::F> + Add<Self::Var, Output = Self::Expr> + Add<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr>
type Var: Into<Self::Expr> + Copy + Send + Sync + Add<Self::F, Output = Self::Expr> + Add<Self::Var, Output = Self::Expr> + Add<Self::Expr, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::Expr, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::Expr, Output = Self::Expr>
type M: Matrix<Self::Var>
Required Methods§
fn main(&self) -> Self::M
fn is_first_row(&self) -> Self::Expr
fn is_last_row(&self) -> Self::Expr
fn is_transition_window(&self, size: usize) -> Self::Expr
fn assert_zero<I: Into<Self::Expr>>(&mut self, x: I)
Provided Methods§
fn is_transition(&self) -> Self::Expr
Sourcefn when<I: Into<Self::Expr>>(
&mut self,
condition: I,
) -> FilteredAirBuilder<'_, Self>
fn when<I: Into<Self::Expr>>( &mut self, condition: I, ) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only when condition
is nonzero.
Sourcefn when_ne<I1: Into<Self::Expr>, I2: Into<Self::Expr>>(
&mut self,
x: I1,
y: I2,
) -> FilteredAirBuilder<'_, Self>
fn when_ne<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, ) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only when x != y
.
Sourcefn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only on the first row.
Sourcefn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced only on the last row.
Sourcefn when_transition(&mut self) -> FilteredAirBuilder<'_, Self>
fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced on all rows except the last.
Sourcefn when_transition_window(
&mut self,
size: usize,
) -> FilteredAirBuilder<'_, Self>
fn when_transition_window( &mut self, size: usize, ) -> FilteredAirBuilder<'_, Self>
Returns a sub-builder whose constraints are enforced on all rows except the last size - 1
.
fn assert_one<I: Into<Self::Expr>>(&mut self, x: I)
fn assert_eq<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, )
Sourcefn assert_bool<I: Into<Self::Expr>>(&mut self, x: I)
fn assert_bool<I: Into<Self::Expr>>(&mut self, x: I)
Assert that x
is a boolean, i.e. either 0 or 1.
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.