Struct wasmedge_sdk::FuncRef
source · pub struct FuncRef { /* private fields */ }
Expand description
Defines a reference to a host function.
The table_and_funcref example presents how to obtain and use FuncRef.
Implementations§
source§impl FuncRef
impl FuncRef
sourcepub fn ty(&self) -> &FuncType
pub fn ty(&self) -> &FuncType
Returns a reference to the ty of the host function this FuncRef points to.
sourcepub fn run(
&self,
executor: &Executor,
args: impl IntoIterator<Item = WasmValue>
) -> WasmEdgeResult<Vec<WasmValue>>
pub fn run( &self, executor: &Executor, args: impl IntoIterator<Item = WasmValue> ) -> WasmEdgeResult<Vec<WasmValue>>
sourcepub async fn run_async<T>(
&self,
async_state: &AsyncState,
executor: &Executor,
args: impl IntoIterator<Item = WasmValue> + Send
) -> WasmEdgeResult<Vec<WasmValue>>
Available on crate feature async
only.
pub async fn run_async<T>( &self, async_state: &AsyncState, executor: &Executor, args: impl IntoIterator<Item = WasmValue> + Send ) -> WasmEdgeResult<Vec<WasmValue>>
async
only.Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FuncRef
impl Send for FuncRef
impl Sync for FuncRef
impl Unpin for FuncRef
impl UnwindSafe for FuncRef
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