Traits

A number of traits, under the rhai:: module namespace, provide additional functionalities.

TraitDescriptionMethods
CustomTypetrait to build a custom type for use with an Enginebuild
Functrait for creating Rust closures from scriptcreate_from_ast, create_from_script
FuncArgstrait for parsing function call argumentsparse
ModuleResolvertrait implemented by module resolution servicesresolve, resolve_ast, resolve_raw
packages::Packagetrait implemented by packagesinit, init_engine, register_into_engine, register_into_engine_as, as_shared_module
plugin::PluginFunctiontrait implemented by plugin functionscall, is_method_call, has_context, is_pure