Trait WasmFunctionCallerExt

Source
pub trait WasmFunctionCallerExt {
    // Required method
    async fn call_function<P, R>(
        &self,
        function_name: &str,
        params: &P,
    ) -> Result<R>
       where P: Serialize + Send + Sync,
             R: for<'de> Deserialize<'de> + Send;
}
Expand description

Extension trait for type-safe function calling (generic, not dyn-compatible)

Required Methods§

Source

async fn call_function<P, R>( &self, function_name: &str, params: &P, ) -> Result<R>
where P: Serialize + Send + Sync, R: for<'de> Deserialize<'de> + Send,

Call a function with compile-time type safety

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: WasmFunctionCaller + Send + Sync> WasmFunctionCallerExt for T

Automatic implementation for all function callers