pub struct Evaluator<State = ()>{ /* private fields */ }Implementations§
Source§impl<State> Evaluator<State>
impl<State> Evaluator<State>
pub fn new(runtime: RuntimeEnv<State>) -> Self
pub fn new_with_compiler( runtime: RuntimeEnv<State>, compiler: Compiler<State>, ) -> Self
pub async fn run( &mut self, program: &CompiledProgram, gas: &mut GasMeter, ) -> Result<Pointer, EvalError>
pub async fn eval( &mut self, expr: &Expr, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
pub async fn eval_library_file( &mut self, path: impl AsRef<Path>, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
pub async fn eval_library_source( &mut self, source: &str, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
pub async fn eval_snippet( &mut self, source: &str, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
pub async fn eval_repl_program( &mut self, program: &Program, state: &mut ReplState, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
pub async fn eval_snippet_at( &mut self, source: &str, importer_path: impl AsRef<Path>, gas: &mut GasMeter, ) -> Result<(Pointer, Type), ExecutionError>
Auto Trait Implementations§
impl<State> Freeze for Evaluator<State>
impl<State = ()> !RefUnwindSafe for Evaluator<State>
impl<State> Send for Evaluator<State>
impl<State> Sync for Evaluator<State>
impl<State> Unpin for Evaluator<State>
impl<State> UnsafeUnpin for Evaluator<State>
impl<State = ()> !UnwindSafe for Evaluator<State>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more