pub trait RegisterNativeFunction<ARGS, RET, RESULT> {
    fn into_callable_function(self) -> CallableFunction;
    fn param_types() -> Box<[TypeId]>;
    fn param_names() -> Box<[&'static str]>;
    fn return_type() -> TypeId;
    fn return_type_name() -> &'static str;
}
Expand description

Trait to register custom Rust functions.

Type Parameters

  • ARGS - a tuple containing parameter types, with &mut T represented by Mut<T>.
  • RET - return type of the function; if the function returns Result, it is the unwrapped inner value type.

Required Methods

Convert this function into a CallableFunction.

Get the type ID’s of this function’s parameters.

(metadata) Get the type names of this function’s parameters. Exported under the metadata feature only.

(metadata) Get the type ID of this function’s return value. Exported under the metadata feature only.

(metadata) Get the type name of this function’s return value. Exported under the metadata feature only.

Implementors