pub trait DynFunction<A, T>where
T: TypeSet,{
// Required method
fn call(
&self,
ctx: &mut T,
args: &[TypedValue<T>],
) -> Result<TypedValue<T>, FunctionCallError>;
}Expand description
Functions and closures that implement this trait can be registered as functions to be called by expressions.
Required Methods§
Sourcefn call(
&self,
ctx: &mut T,
args: &[TypedValue<T>],
) -> Result<TypedValue<T>, FunctionCallError>
fn call( &self, ctx: &mut T, args: &[TypedValue<T>], ) -> Result<TypedValue<T>, FunctionCallError>
Call the function with the specified arguments.
§Errors
This functions returns an error if:
- The number of arguments is incorrect
- The types of arguments are incorrect