[][src]Struct watson::WasmExecution

pub struct WasmExecution<T> where
    T: InterpretableProgram
{ pub call_stack: (usize, Vec<WasmValue>), pub value_stack: Vec<WasmValue>, pub current_position: Vec<usize>, pub memory: Arc<Mutex<Vec<u8>>>, pub program: Arc<Mutex<T>>, // some fields omitted }

Fields

call_stack: (usize, Vec<WasmValue>)value_stack: Vec<WasmValue>current_position: Vec<usize>memory: Arc<Mutex<Vec<u8>>>program: Arc<Mutex<T>>

Implementations

impl<T> WasmExecution<T> where
    T: InterpretableProgram
[src]

pub fn new(
    name: &str,
    params: &[WasmValue],
    program: Arc<Mutex<T>>,
    memory: Arc<Mutex<Vec<u8>>>
) -> Result<Self, &'static str>
[src]

pub fn next_unit(&mut self) -> Result<ExecutionUnit, &'static str>[src]

pub fn execute(&mut self, r: ExecutionResponse) -> Result<(), &'static str>[src]

pub fn memory(&mut self) -> Option<Arc<Mutex<Vec<u8>>>>[src]

Trait Implementations

impl<'de, T> Deserialize<'de> for WasmExecution<T> where
    T: InterpretableProgram,
    T: Default
[src]

impl<T> Serialize for WasmExecution<T> where
    T: InterpretableProgram
[src]

Auto Trait Implementations

impl<T> Send for WasmExecution<T> where
    T: Send

impl<T> Sync for WasmExecution<T> where
    T: Send

impl<T> Unpin for WasmExecution<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.