Trait Frame

Source
pub trait Frame: Sized {
    type Evm;
    type FrameInit;
    type FrameResult;
    type Error;

    // Required methods
    fn init_first(
        evm: &mut Self::Evm,
        frame_input: Self::FrameInit,
    ) -> Result<FrameOrResult<Self>, Self::Error>;
    fn init(
        &self,
        evm: &mut Self::Evm,
        frame_input: Self::FrameInit,
    ) -> Result<FrameOrResult<Self>, Self::Error>;
    fn run(
        &mut self,
        evm: &mut Self::Evm,
    ) -> Result<FrameInitOrResult<Self>, Self::Error>;
    fn return_result(
        &mut self,
        evm: &mut Self::Evm,
        result: Self::FrameResult,
    ) -> Result<(), Self::Error>;
}
Expand description

Call frame trait

Required Associated Types§

Required Methods§

Source

fn init_first( evm: &mut Self::Evm, frame_input: Self::FrameInit, ) -> Result<FrameOrResult<Self>, Self::Error>

Source

fn init( &self, evm: &mut Self::Evm, frame_input: Self::FrameInit, ) -> Result<FrameOrResult<Self>, Self::Error>

Source

fn run( &mut self, evm: &mut Self::Evm, ) -> Result<FrameInitOrResult<Self>, Self::Error>

Source

fn return_result( &mut self, evm: &mut Self::Evm, result: Self::FrameResult, ) -> Result<(), Self::Error>

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<EVM, ERROR> Frame for EthFrame<EVM, ERROR, EthInterpreter>
where EVM: EvmTr<Precompiles: PrecompileProvider<Context = EVM::Context, Output = InterpreterResult>, Instructions: InstructionProvider<Context = EVM::Context, InterpreterTypes = EthInterpreter, Output = InterpreterAction>>, ERROR: From<ContextTrDbError<EVM::Context>> + From<PrecompileError>,

Source§

type Evm = EVM

Source§

type FrameInit = FrameInput

Source§

type FrameResult = FrameResult

Source§

type Error = ERROR