Type Alias wasmedge_sdk::WasmValue
source · pub type WasmValue = WasmValue;
Expand description
WebAssembly value type.
Aliased Type§
struct WasmValue { /* private fields */ }
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) -> WasmValue
pub fn from_null_ref(ref_ty: RefType) -> WasmValue
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) -> WasmValue
pub fn from_func_ref(func_ref: FuncRef) -> WasmValue
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) -> WasmValue
pub fn from_extern_ref<T>(extern_obj: &mut T) -> WasmValue
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.