Trait IntoHostFn
pub trait IntoHostFn<Marker> {
// Required method
fn into_host_fn_parts(
self,
) -> (Rc<dyn Fn(&[Value]) -> Value>, Vec<HostType>, HostType);
}Expand description
Adapts a Rust closure into a registered host function.
The Marker type parameter disambiguates the blanket impls by arity (and,
for &str, by borrow), the same trick rhai/bevy use to make
register_fn accept closures of many shapes without annotations.