evm_interpreter/interpreter/
mod.rs1mod etable;
2mod valids;
3
4use alloc::vec::Vec;
5
6pub use self::etable::EtableInterpreter;
7use crate::error::{Capture, ExitError, ExitResult};
8
9pub trait Interpreter<H> {
10 type State;
11 type Trap;
12
13 fn deconstruct(self) -> (Self::State, Vec<u8>);
14 fn run(&mut self, handle: &mut H) -> Capture<ExitResult, Self::Trap>;
15}
16
17pub trait FeedbackInterpreter<H, Feedback>: Interpreter<H> {
18 fn feedback(&mut self, feedback: Feedback, handler: &mut H) -> Result<(), ExitError>;
19}
20
21pub trait StepInterpreter<H>: Interpreter<H> {
22 fn step(&mut self, handle: &mut H) -> Result<(), Capture<ExitResult, Self::Trap>>;
23}