openvm_native_compiler::ir

Trait MemVariable

Source
pub trait MemVariable<C: Config>: Variable<C> {
    // Required methods
    fn size_of() -> usize;
    fn load(
        &self,
        ptr: Ptr<C::N>,
        index: MemIndex<C::N>,
        builder: &mut Builder<C>,
    );
    fn store(
        &self,
        ptr: Ptr<C::N>,
        index: MemIndex<C::N>,
        builder: &mut Builder<C>,
    );
}

Required Methods§

Source

fn size_of() -> usize

Source

fn load(&self, ptr: Ptr<C::N>, index: MemIndex<C::N>, builder: &mut Builder<C>)

Loads the variable from the heap.

Source

fn store(&self, ptr: Ptr<C::N>, index: MemIndex<C::N>, builder: &mut Builder<C>)

Stores the variable to the heap.

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.

Implementations on Foreign Types§

Source§

impl<C: Config, T: MemVariable<C>, const N: usize> MemVariable<C> for [T; N]

Source§

fn size_of() -> usize

Source§

fn load(&self, ptr: Ptr<C::N>, index: MemIndex<C::N>, builder: &mut Builder<C>)

Source§

fn store(&self, ptr: Ptr<C::N>, index: MemIndex<C::N>, builder: &mut Builder<C>)

Implementors§

Source§

impl<C: Config> MemVariable<C> for Usize<C::N>

Source§

impl<C: Config> MemVariable<C> for Ext<C::F, C::EF>

Source§

impl<C: Config> MemVariable<C> for Felt<C::F>

Source§

impl<C: Config> MemVariable<C> for Ptr<C::N>

Source§

impl<C: Config> MemVariable<C> for Var<C::N>

Source§

impl<C: Config, T: MemVariable<C>> MemVariable<C> for Array<C, T>

Source§

impl<C: Config, T: MemVariable<C>> MemVariable<C> for Ref<C, T>