Struct wasmedge_sys::WasmValue
source · pub struct WasmValue { /* private fields */ }
Expand description
Defines a WebAssembly value.
Implementations§
source§impl WasmValue
impl WasmValue
sourcepub fn as_raw(&self) -> WasmEdge_Value
pub fn as_raw(&self) -> WasmEdge_Value
Returns the raw WasmEdge_Value
.
sourcepub fn from_null_ref(ref_ty: RefType) -> Self
pub fn from_null_ref(ref_ty: RefType) -> Self
sourcepub fn is_null_ref(&self) -> bool
pub fn is_null_ref(&self) -> bool
Checks if a WasmValue is NullRef or not.
sourcepub fn from_func_ref(func_ref: FuncRef) -> Self
pub fn from_func_ref(func_ref: FuncRef) -> Self
sourcepub fn func_ref(&self) -> Option<FuncRef>
pub fn func_ref(&self) -> Option<FuncRef>
Returns the FuncRef(crate::FuncRef).
If the WasmValue is a NullRef
, then None
is returned.
sourcepub fn from_extern_ref<T>(extern_obj: &mut T) -> Self
pub fn from_extern_ref<T>(extern_obj: &mut T) -> Self
sourcepub fn extern_ref<T>(&self) -> Option<&T>
pub fn extern_ref<T>(&self) -> Option<&T>
Returns the reference to an external object.
If the WasmValue is a NullRef
, then None
is returned.
Trait Implementations§
source§impl From<WasmEdge_Value> for WasmValue
impl From<WasmEdge_Value> for WasmValue
source§fn from(raw_val: WasmEdge_Value) -> Self
fn from(raw_val: WasmEdge_Value) -> Self
Converts to this type from the input type.