AdapterTraceExecutor

Trait AdapterTraceExecutor 

Source
pub trait AdapterTraceExecutor<F>: Clone {
    type ReadData;
    type WriteData;
    type RecordMut<'a>
       where Self: 'a;

    const WIDTH: usize;

    // Required methods
    fn start(pc: u32, memory: &TracingMemory, record: &mut Self::RecordMut<'_>);
    fn read(
        &self,
        memory: &mut TracingMemory,
        instruction: &Instruction<F>,
        record: &mut Self::RecordMut<'_>,
    ) -> Self::ReadData;
    fn write(
        &self,
        memory: &mut TracingMemory,
        instruction: &Instruction<F>,
        data: Self::WriteData,
        record: &mut Self::RecordMut<'_>,
    );
}
Expand description

A helper trait for expressing generic state accesses within the implementation of [TraceExecutor]. Note that this is only a helper trait when the same interface of state access is reused or shared by multiple implementations. It is not required to implement this trait if it is easier to implement the [TraceExecutor] trait directly without this trait.

Required Associated Constants§

Required Associated Types§

Source

type ReadData

Source

type WriteData

Source

type RecordMut<'a> where Self: 'a

Required Methods§

Source

fn start(pc: u32, memory: &TracingMemory, record: &mut Self::RecordMut<'_>)

Source

fn read( &self, memory: &mut TracingMemory, instruction: &Instruction<F>, record: &mut Self::RecordMut<'_>, ) -> Self::ReadData

Source

fn write( &self, memory: &mut TracingMemory, instruction: &Instruction<F>, data: Self::WriteData, record: &mut Self::RecordMut<'_>, )

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, const R: usize, const W: usize> AdapterTraceExecutor<F> for NativeAdapterExecutor<F, R, W>
where F: PrimeField32,