Struct parity_wasm::interpreter::VariableInstance
[−]
[src]
pub struct VariableInstance<E: UserError> { /* fields omitted */ }
Variable instance.
Methods
impl<E> VariableInstance<E> where
E: UserError,
[src]
E: UserError,
fn new(
is_mutable: bool,
variable_type: VariableType,
value: RuntimeValue
) -> Result<Self, Error<E>>
[src]
is_mutable: bool,
variable_type: VariableType,
value: RuntimeValue
) -> Result<Self, Error<E>>
New variable instance
fn new_global(
global_type: &GlobalType,
value: RuntimeValue
) -> Result<Self, Error<E>>
[src]
global_type: &GlobalType,
value: RuntimeValue
) -> Result<Self, Error<E>>
New global variable
fn new_external_global(
is_mutable: bool,
variable_type: VariableType,
value: Box<ExternalVariableValue<E>>
) -> Result<Self, Error<E>>
[src]
is_mutable: bool,
variable_type: VariableType,
value: Box<ExternalVariableValue<E>>
) -> Result<Self, Error<E>>
New global with externally stored value.
fn is_mutable(&self) -> bool
[src]
Is mutable
fn variable_type(&self) -> VariableType
[src]
Get variable type.
fn get(&self) -> RuntimeValue
[src]
Get the value of the variable instance
fn set(&self, value: RuntimeValue) -> Result<(), Error<E>>
[src]
Set the value of the variable instance