Macro rhai::set_exported_fn[][src]

set_exported_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function into a Rhai Module.

Usage

use rhai::plugin::*;

#[export_fn]
fn my_plugin_function(...) {
  ...
}

let mut module = Module::new();

set_exported_fn!(module, "calc", my_plugin_function);