pub trait ExecutionHandler {
type Context;
type Error;
type Frame: Frame<Context = Self::Context, Error = Self::Error>;
type ExecResult;
// Required methods
fn init_first_frame(
&mut self,
context: &mut Self::Context,
gas_limit: u64,
) -> Result<FrameOrFrameResult<Self::Frame>, Self::Error>;
fn last_frame_result(
&self,
context: &mut Self::Context,
frame_result: <Self::Frame as Frame>::FrameResult,
) -> Result<Self::ExecResult, Self::Error>;
// Provided method
fn run(
&self,
context: &mut Self::Context,
frame: Self::Frame,
) -> Result<Self::ExecResult, Self::Error> { ... }
}
Required Associated Types§
type Context
type Error
type Frame: Frame<Context = Self::Context, Error = Self::Error>
type ExecResult
Required Methods§
Sourcefn init_first_frame(
&mut self,
context: &mut Self::Context,
gas_limit: u64,
) -> Result<FrameOrFrameResult<Self::Frame>, Self::Error>
fn init_first_frame( &mut self, context: &mut Self::Context, gas_limit: u64, ) -> Result<FrameOrFrameResult<Self::Frame>, Self::Error>
Execute call.
Sourcefn last_frame_result(
&self,
context: &mut Self::Context,
frame_result: <Self::Frame as Frame>::FrameResult,
) -> Result<Self::ExecResult, Self::Error>
fn last_frame_result( &self, context: &mut Self::Context, frame_result: <Self::Frame as Frame>::FrameResult, ) -> Result<Self::ExecResult, Self::Error>
Execute create.