Module plugin

Expand description

Module defining macros for developing plugins.

Modules§

mem
Basic functions for dealing with memory.

Macros§

combine_with_exported_module
Macro to combine a plugin module into an existing module.
exported_module
Macro to generate a Rhai Module from a plugin module defined via #[export_module].
register_exported_fn
Macro to register a plugin function (defined via #[export_fn]) into an Engine.
set_exported_fn
Macro to register a plugin function into a Rhai Module.
set_exported_global_fn
Macro to register a plugin function into a Rhai Module and expose it globally.

Structs§

Dynamic
Dynamic type containing any value.
Engine
Rhai main scripting engine.
FuncRegistration
Type for fine-tuned module function registration.
ImmutableString
The system immutable string type.
Module
A module which may contain variables, sub-modules, external Rust functions, and/or script-defined functions.
NativeCallContext
Context of a native Rust function call.
Position
A location (line number + character position) in the input script.
TypeId
A TypeId represents a globally unique identifier for a type.

Enums§

EvalAltResult
Evaluation result.
FnAccess
A type representing the access mode of a function.
FnNamespace
A type representing the namespace of a function.
RhaiFunc
(internals) A type encapsulating a function callable by Rhai. Exported under the internals feature only.

Traits§

PluginFunc
Trait implemented by a plugin function.

Type Aliases§

RhaiResult
Result of a Rhai function.

Attribute Macros§

export_fn
Attribute, when put on a Rust function, turns it into a plugin function.
export_module
Attribute, when put on a Rust module, turns it into a plugin module.
expose_under_internals
Macro to automatically expose a Rust function, type-def or use statement as pub when under the internals feature.

Derive Macros§

CustomType
Macro to implement the [CustomType][rhai::CustomType] trait.