Trait ArithHelpers

Source
pub trait ArithHelpers<F: One + Debug + Zero>
where Self: Interpreter<F>,
{ // Required method fn two_pow(x: u64) -> Self::Variable; // Provided methods fn zero() -> Self::Variable { ... } fn one() -> Self::Variable { ... } fn two() -> Self::Variable { ... } }
Expand description

This trait contains helper functions for arithmetic operations used in the Keccak circuit

Required Methods§

Source

fn two_pow(x: u64) -> Self::Variable

Returns a variable representing the value 2^x

Provided Methods§

Source

fn zero() -> Self::Variable

Returns a variable representing the value zero

Source

fn one() -> Self::Variable

Returns a variable representing the value one

Source

fn two() -> Self::Variable

Returns a variable representing the value two

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.

Implementors§

Source§

impl<F: Field> ArithHelpers<F> for o1vm::interpreters::keccak::constraints::Env<F>

Source§

impl<F: Field> ArithHelpers<F> for o1vm::interpreters::keccak::witness::Env<F>