Skip to main content

InstructionDriverPolicy

Trait InstructionDriverPolicy 

Source
pub trait InstructionDriverPolicy<P, F>{
    type Return;
    type Abrupt;
    type Yield;
    type Interrupt;
    type Fault;

    // Required method
    fn step(
        &mut self,
        instruction: &P::Instruction,
        frame: &mut F,
    ) -> PolicyStep<F, Self::Return, Self::Abrupt, Self::Yield, Self::Interrupt, Self::Fault>;
}
Expand description

Consumer semantics invoked once per charged instruction.

A WebAssembly engine or a bytecode-independent workflow machine can supply this policy. The callback cannot run until admission identity is checked.

Required Associated Types§

Source

type Return

Return transfer data.

Source

type Abrupt

Abrupt outcome.

Source

type Yield

Cooperative yield data.

Source

type Interrupt

Interrupt data.

Source

type Fault

Instruction failure.

Required Methods§

Source

fn step( &mut self, instruction: &P::Instruction, frame: &mut F, ) -> PolicyStep<F, Self::Return, Self::Abrupt, Self::Yield, Self::Interrupt, Self::Fault>

Executes one instruction policy and returns an explicit control outcome.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§