use crate::{BreakpointValue, ExecutorError, VMHooksEarlyExit};
pub enum InstanceCallResult {
Ok,
FunctionNotFound,
RuntimeError(ExecutorError),
VMHooksEarlyExit(VMHooksEarlyExit),
Breakpoint(BreakpointValue),
}
pub trait Instance {
fn call(&mut self, func_name: &str, points_limit: u64) -> InstanceCallResult;
fn check_signatures(&self) -> bool;
fn has_function(&self, func_name: &str) -> bool;
fn get_exported_function_names(&self) -> Vec<String>;
fn get_points_used(&mut self) -> Result<u64, ExecutorError>;
fn reset(&self) -> Result<(), ExecutorError>;
fn cache(&self) -> Result<Vec<u8>, ExecutorError>;
}