Crate config

Source

Re-exports§

pub use paste;

Modules§

epoch

Macros§

declare_event
Helper for declaring a named event handler callback signature.

Structs§

CallbackSignature
CallbackSignature is a bit sugar to aid with statically typing event callback function invocation.
LuaConfig

Statics§

CALLBACK_SIGNATURES
VALIDATE_ONLY
VALIDATION_FAILED

Functions§

any_err
Helper for mapping back to lua errors
async_call_callback
async_call_callback_non_default
decorate_callback_name
does_callback_allow_multiple
from_lua_value
Convert from a lua value to a deserializable type, with a slightly more helpful error message in case of failure. NOTE: the “, while processing” portion of the error messages generated here is coupled with a regex in typing.lua!
get_or_create_module
get_or_create_sub_module
Given a name path like foo or foo.bar.baz, sets up the module registry hierarchy to instantiate that path. Returns the leaf node of that path to allow the caller to register/assign functions etc. into it
impl_pairs_and_index
Provides implementations of __pairs, __index and __len metamethods for a type that is Serialize and UserData. Neither implementation is considered to be ideal, as we must first serialize the value into a json Value which is then either iterated over, or indexed to produce the appropriate result for the metamethod.
is_validating
load_config
materialize_to_lua_value
This function will try to obtain a native lua representation of the provided value. It does this by attempting to iterate the pairs of any userdata it finds as either the value itself or the values of a table value by recursively applying materialize_to_lua_value to the value. This produces a lua value that can then be processed by the Deserialize impl on Value.
register
serialize_options
set_gc_on_put
Set the gc on put percentage chance, in the range 0-100
set_max_age
set_max_spare
set_max_use
set_policy_path
set_validation_failed
validation_failed

Type Aliases§

RegisterFunc