pub trait InvokeArgs {
// Required methods
fn can_invoke<'runtime>(
&self,
runtime: &'runtime Runtime,
signature: &FunctionSignature,
) -> Result<(), String>;
unsafe fn invoke<ReturnType>(self, fn_ptr: *const c_void) -> ReturnType;
}Expand description
A trait that handles calling a certain function with a set of arguments. This trait is implemented for tuples up to and including 20 elements.
Required Methods§
Sourcefn can_invoke<'runtime>(
&self,
runtime: &'runtime Runtime,
signature: &FunctionSignature,
) -> Result<(), String>
fn can_invoke<'runtime>( &self, runtime: &'runtime Runtime, signature: &FunctionSignature, ) -> Result<(), String>
Determines whether the specified function can be called with these arguments
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.