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 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: AsFunc>(func_ref: &Func) -> Self
pub fn from_func_ref<Func: AsFunc>(func_ref: &Func) -> Self
Sourcepub fn func_ref(&self) -> Option<FuncRef<&Self>>
pub fn func_ref(&self) -> Option<FuncRef<&Self>>
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 null_extern_ref() -> Self
pub fn null_extern_ref() -> 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.
impl Copy for WasmValue
Auto Trait Implementations§
impl Freeze for WasmValue
impl RefUnwindSafe for WasmValue
impl Send for WasmValue
impl Sync for WasmValue
impl Unpin for WasmValue
impl UnwindSafe for WasmValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more