pub trait HostFunction: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn execute(
&self,
ctx: &mut HostFunctionContext,
args: &[u8],
) -> HostCallResult;
fn description(&self) -> &str;
}Expand description
Trait for host function implementations
Each host function that WASM plugins can call implements this trait.
Required Methods§
Sourcefn execute(&self, ctx: &mut HostFunctionContext, args: &[u8]) -> HostCallResult
fn execute(&self, ctx: &mut HostFunctionContext, args: &[u8]) -> HostCallResult
Execute the function
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description