1 2 3 4 5 6 7 8 9 10
use std::time::Duration; pub trait Compiler { fn compile(&self); fn execute(&self, timeout: u32) -> Duration; } pub trait Interpreter { fn execute(&self, timeout: u32) -> Duration; }