pub struct Runtime<'env> { /* private fields */ }
Expand description
A stackless bytecode runtime in charge of pre- and post-execution checking, conversion, and
monitoring. The main, step-by-step interpretation loop is delegated to the Player
instance.
Implementations
sourceimpl<'env> Runtime<'env>
impl<'env> Runtime<'env>
sourcepub fn new(env: &'env GlobalEnv, functions: &'env FunctionTargetsHolder) -> Self
pub fn new(env: &'env GlobalEnv, functions: &'env FunctionTargetsHolder) -> Self
Construct a runtime with all information pre-loaded.
sourcepub fn execute(
&self,
fun_env: &FunctionEnv<'_>,
ty_args: &[TypeTag],
args: &[MoveValue],
global_state: &mut GlobalState
) -> VMResult<Vec<TypedValue>>
pub fn execute(
&self,
fun_env: &FunctionEnv<'_>,
ty_args: &[TypeTag],
args: &[MoveValue],
global_state: &mut GlobalState
) -> VMResult<Vec<TypedValue>>
Execute a function (identified by fun_id
) with given type arguments, arguments, and a
mutable reference of the global state. Returns the result of the execution. Any updates to
the global states is recorded in the mutable reference.
Auto Trait Implementations
impl<'env> !RefUnwindSafe for Runtime<'env>
impl<'env> !Send for Runtime<'env>
impl<'env> !Sync for Runtime<'env>
impl<'env> Unpin for Runtime<'env>
impl<'env> !UnwindSafe for Runtime<'env>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more