pub type DynLibSymbolHook = fn(state: &mut LuaState, handle: DynLibId, symbol: &[u8]) -> Result<DynamicSymbol, LuaError>;Expand description
Function-pointer signature for resolving a symbol in a previously loaded
dynamic library, installed on GlobalState::dynlib_symbol_hook.
The hook receives the DynLibId returned by DynLibLoadHook and the
requested symbol name. Returning DynamicSymbol::RustNative makes the
symbol callable; LuaCAbi/Unsupported propagate to package.loadlib
as an "init" failure with a clear message.