Trait rhai::RegisterNativeFunction [−][src]
pub trait RegisterNativeFunction<Args, 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.
Required methods
fn into_callable_function(self) -> CallableFunction
fn into_callable_function(self) -> CallableFunction
Convert this function into a CallableFunction
.
(metadata) Get the type names of this function’s parameters.
Exported under the metadata
feature only.
fn return_type() -> TypeId
fn return_type() -> TypeId
(metadata) Get the type ID of this function’s return value.
Exported under the metadata
feature only.
fn return_type_name() -> &'static str
fn return_type_name() -> &'static str
(metadata) Get the type name of this function’s return value.
Exported under the metadata
feature only.