Struct VM

Source
pub struct VM { /* private fields */ }

Implementations§

Source§

impl VM

Source

pub fn new( module: Rc<Module>, breakpoints: Rc<RefCell<Breakpoints>>, ) -> Result<VM, InitError>

Source

pub fn value_stack(&self) -> &[Value]

Source

pub fn value_stack_mut(&mut self) -> &mut Vec<Value>

Source

pub fn function_stack(&self) -> &[FunctionFrame]

Source

pub fn label_stack(&self) -> &[Label]

Source

pub fn trap(&self) -> Option<&Trap>

Source

pub fn ip(&self) -> CodePosition

Source

pub fn globals(&self) -> &[Value]

Source

pub fn globals_mut(&mut self) -> &mut [Value]

Source

pub fn memory(&self) -> &Memory

Source

pub fn memory_mut(&mut self) -> &mut Memory

Source

pub fn locals(&self) -> VMResult<&[Value]>

Source

pub fn locals_mut(&mut self) -> VMResult<&mut [Value]>

Source

pub fn start(&mut self) -> VMResult<()>

Source

pub fn run(&mut self) -> Trap

Source

pub fn run_func(&mut self, index: u32, args: &[Value]) -> Trap

Source

pub fn continue_execution(&mut self) -> Trap

Source

pub fn execute_step_over(&mut self) -> VMResult<()>

Source

pub fn execute_step_out(&mut self) -> VMResult<()>

Source

pub fn execute_step(&mut self) -> VMResult<()>

Auto Trait Implementations§

§

impl Freeze for VM

§

impl !RefUnwindSafe for VM

§

impl !Send for VM

§

impl !Sync for VM

§

impl Unpin for VM

§

impl !UnwindSafe for VM

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.