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§
Sourceasync fn call_function<P, R>(
&self,
function_name: &str,
params: &P,
) -> Result<R>
async fn call_function<P, R>( &self, function_name: &str, params: &P, ) -> Result<R>
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§
impl<T: WasmFunctionCaller + Send + Sync> WasmFunctionCallerExt for T
Automatic implementation for all function callers