pub trait ProcessorExternalities {
// Required methods
fn new(context: ProcessorContext) -> Self;
fn into_ext_info<Context>(
self,
ctx: &mut Context,
memory: &impl Memory<Context>,
) -> Result<ExtInfo, MemoryError>;
fn lazy_pages_init_for_program<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
prog_id: ProgramId,
memory_infix: MemoryInfix,
stack_end: Option<WasmPage>,
globals_config: GlobalsAccessConfig,
lazy_pages_costs: LazyPagesCosts,
);
fn lazy_pages_post_execution_actions<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
);
fn lazy_pages_status() -> Status;
}
Expand description
Trait to which ext must have to work in processor wasm executor. Currently used only for lazy-pages support.
Required Methods§
sourcefn new(context: ProcessorContext) -> Self
fn new(context: ProcessorContext) -> Self
Create new
sourcefn into_ext_info<Context>(
self,
ctx: &mut Context,
memory: &impl Memory<Context>,
) -> Result<ExtInfo, MemoryError>
fn into_ext_info<Context>( self, ctx: &mut Context, memory: &impl Memory<Context>, ) -> Result<ExtInfo, MemoryError>
Convert externalities into info.
sourcefn lazy_pages_init_for_program<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
prog_id: ProgramId,
memory_infix: MemoryInfix,
stack_end: Option<WasmPage>,
globals_config: GlobalsAccessConfig,
lazy_pages_costs: LazyPagesCosts,
)
fn lazy_pages_init_for_program<Context>( ctx: &mut Context, mem: &mut impl Memory<Context>, prog_id: ProgramId, memory_infix: MemoryInfix, stack_end: Option<WasmPage>, globals_config: GlobalsAccessConfig, lazy_pages_costs: LazyPagesCosts, )
Protect and save storage keys for pages which has no data
sourcefn lazy_pages_post_execution_actions<Context>(
ctx: &mut Context,
mem: &mut impl Memory<Context>,
)
fn lazy_pages_post_execution_actions<Context>( ctx: &mut Context, mem: &mut impl Memory<Context>, )
Lazy pages program post execution actions
sourcefn lazy_pages_status() -> Status
fn lazy_pages_status() -> Status
Returns lazy pages status
Object Safety§
This trait is not object safe.
Implementors§
impl<LP: LazyPagesInterface> ProcessorExternalities for Ext<LP>
Empty implementation for non-substrate (and non-lazy-pages) using