Expand description
Abstractions to do with dynamic script functions
Modules§
- arg_
meta - Trait implementations to help with function dispatch.
- from
- This module contains the
FromScripttrait and its implemenations. - from_
ref - Contains the
FromScriptReftrait and its implementations. - into
- Implementations of the
IntoScripttrait for various types. - into_
ref - Contains the
IntoScriptReftrait and its implementations. - magic_
functions - All the switchable special functions used by language implementors
- namespace
- A module for managing namespaces for functions
- script_
function - Implementations of the
ScriptFunctionandScriptFunctionMuttraits for functions with up to 13 arguments. - type_
dependencies - This module contains the
GetTypeDependenciestrait and its implementations for various types.
Macros§
- match_
by_ type - a utility for matching types by their
std::any::TypeId
Structs§
- AppScript
Function Registry - Equivalent to
AppScriptFunctionRegistrybut stores functions with a more convenient signature for scripting to avoid boxing every argument. - Dummy
Script Function Registry - Identical to the
AppScriptFunctionRegistry, but the functions only exist for docs purposes, use if you provide functions at a lower level, but still want to include the function in the docs - Dynamic
Script Function - A dynamic script function.
- Dynamic
Script Function Mut - A dynamic mutable script function.
- Function
Call Context - The caller context when calling a script function. Functions can choose to react to caller preferences such as converting 1-indexed numbers to 0-indexed numbers
- Function
Key - A key used to identify a function in the registry
- Global
Namespace - A type which implements
IntoNamespaceby always converting to the global namespace - Location
Context - Describes a location within a script
- Magic
Functions - A list of magic methods, these only have one replacable implementation, and apply to all
ReflectReferences. It’s up to the language implementer to call these in the right order (after any type specific overrides). - Mut
- A wrapper around a mutable reference to a value of type
T. - Namespace
Builder - A convenience builder for registering multiple functions in a namespace
- Ref
- A wrapper around a reference to a value of type
T. - Script
Function Registry - A registry of dynamic script functions
- Script
Function Registry Arc - A thread-safe reference counted wrapper around a
ScriptFunctionRegistry - Union
- A union of two or more (by nesting unions) types.
- Val
- A wrapper around a value of type
T.
Enums§
- Namespace
- A namespace for functions
Traits§
- ArgMeta
- Describes an argument to a script function. Provides necessary information for the function to handle dispatch.
- From
Script - Describes the procedure for constructing a value of type
Tfrom aScriptValue. - From
Script Ref - Converts from a
ScriptValueto a value equivalent to the givenTypeId. - GetFunction
Type Dependencies - A trait collecting type dependency information for a whole function. Used to register everything used by a function with the type registry
- GetType
Dependencies - Functionally identical to
GetTypeRegistrationbut without the ’static bound - Into
Namespace - A type convertible to a
Namespace - Into
Script - Converts a value into a
ScriptValue. - Into
Script Ref - Converts a value represented by a reference into a
crate::ScriptValue. Instead of a direct conversion, the trait tries to peek into the value behind the reference and find out the most suitable representation. - Script
Argument - Marker trait for types that can be used as arguments to a script function.
- Script
Function - A trait implemented by functions which can act as dynamic script functions, which can then be registered against a
ScriptFunctionRegistry. - Script
Function Mut - A trait implemented by functions which can act as mutable dynamic script functions.
- Script
Return - Marker trait for types that can be used as return values from a script function.
- Typed
Script Argument - Marker trait for types that can be used as arguments to a script function. And contain type information.
- Typed
Script Return - Marker trait for types that can be used as return values from a script function. And contain type information.