Struct parity_wasm::interpreter::VariableInstance
[−]
[src]
pub struct VariableInstance { /* fields omitted */ }
Variable instance.
Methods
impl VariableInstance
[src]
fn new(
is_mutable: bool,
variable_type: VariableType,
value: RuntimeValue
) -> Result<Self, Error>
[src]
is_mutable: bool,
variable_type: VariableType,
value: RuntimeValue
) -> Result<Self, Error>
New variable instance
fn new_global(
global_type: &GlobalType,
value: RuntimeValue
) -> Result<Self, Error>
[src]
global_type: &GlobalType,
value: RuntimeValue
) -> Result<Self, Error>
New global variable
fn new_external_global(
is_mutable: bool,
variable_type: VariableType,
value: Box<ExternalVariableValue>
) -> Result<Self, Error>
[src]
is_mutable: bool,
variable_type: VariableType,
value: Box<ExternalVariableValue>
) -> Result<Self, Error>
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>
[src]
Set the value of the variable instance