Module casbin::rhai [−][src]
Modules
packages | Module containing all built-in packages available to Rhai, plus facilities to define custom packages. |
plugin | Module defining macros for developing plugins. |
serde | (SERDE) Serialization and deserialization support for |
Macros
combine_with_exported_module | Macro to combine a plugin module into an existing module. |
def_package | Macro that makes it easy to define a package (which is basically a shared module) and register functions into it. |
exported_module | Macro to generate a Rhai |
register_exported_fn | Macro to register a plugin function (defined via |
set_exported_fn | Macro to register a plugin function into a Rhai |
set_exported_global_fn | Macro to register a plugin function into a Rhai |
Structs
AST | Compiled AST (abstract syntax tree) of a Rhai script. |
Dynamic | Dynamic type containing any value. |
Engine | Rhai main scripting engine. |
EvalContext | Context of a script evaluation process. |
Expression | An expression sub-tree in an |
FnPtr | A general function pointer, which may carry additional (i.e. curried) argument values to be passed onto a function during a call. |
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. |
ParseError | Error when parsing a script. |
Position | A location (line number + character position) in the input script. |
Scope | Type containing information about the current scope.
Useful for keeping state between |
Shared | A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’. |
Enums
EvalAltResult | Evaluation result. |
FnAccess | A type representing the access mode of a function. |
FnNamespace | A type representing the namespace of a function. |
LexError | (INTERNALS) Error encountered when tokenizing the script text.
Exported under the |
ParseErrorType | Type of error encountered when parsing a script. |
Constants
OP_CONTAINS | Standard method function for containment testing. |
OP_EQUALS | Standard equality comparison operator. |
Traits
RegisterFn | Deprecated A trait to enable registering Rust functions. This trait is no longer needed and will be removed in the future. |
RegisterNativeFunction | Trait to register custom Rust functions. |
RegisterResultFn | Deprecated A trait to enable registering Rust functions. This trait is no longer needed and will be removed in the future. |
Type Definitions
Array | Variable-sized array of |
INT | The system integer type.
It is defined as |
Identifier | An identifier in Rhai. |
Map | Hash map of |
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. |