pub enum InterruptKind {
Finished,
Trap,
Ecalli(u32),
Segfault(Segfault),
NotEnoughGas,
Step,
}Variants§
Finished
The execution finished normally.
This happens when the program jumps to the address 0xffff0000.
Trap
The execution finished abnormally with a trap.
This can happen for a few reasons:
- if the
trapinstruction is executed, - if an invalid instruction is executed,
- if a jump to an invalid address is made,
- if a segmentation fault is triggered (when dynamic paging is not enabled for this VM)
Ecalli(u32)
The execution triggered an external call with an ecalli instruction.
Segfault(Segfault)
The execution triggered a segmentation fault.
This happens when a program accesses a memory page that is not mapped, or tries to write to a read-only page.
Requires dynamic paging to be enabled with ModuleConfig::set_dynamic_paging, otherwise is never emitted.
NotEnoughGas
The execution ran out of gas.
Requires gas metering to be enabled with ModuleConfig::set_gas_metering, otherwise is never emitted.
Step
Executed a single instruction.
Requires execution step-tracing to be enabled with ModuleConfig::set_step_tracing, otherwise is never emitted.
Trait Implementations§
Source§impl Clone for InterruptKind
impl Clone for InterruptKind
Source§fn clone(&self) -> InterruptKind
fn clone(&self) -> InterruptKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more