pub fn call_with_cache<'lua, R: Deserialize<'lua>>(
    lua: &'lua Lua,
    func: &str,
    arg: mlua::Value<'lua>,
) -> Result<R> {
    let caller: mlua::Function =
        resolve_fn(&lua.globals(), "xplr.__CACHE__.call")?;
    let func = format!("xplr.fn.{}", func);
    let func: mlua::Function = resolve_fn(&lua.globals(), &func)?;
    let res: mlua::Value = caller.call((func, arg))?;
    let res: R = lua.from_value(res)?;
    Ok(res)
}
/// Used to call lua functions with cache support.
Used to call lua functions with cache support.
Used to call lua functions with cache support .
pub fn call_with_cache<'lua, R: Deserialize<'lua>>(
    lua: &'lua Lua,
    func: &str,
    arg: mlua::Value<'lua>,
) -> Result<R> {
    let caller: mlua::Function =
        resolve_fn(&lua.globals(), "xplr.__CACHE__.call")?;
    let func = format!("xplr.fn.{}", func);
    let func: mlua::Function = resolve_fn(&lua.globals(), &func)?;
    let res: mlua::Value = caller.call((func, arg))?;
    let res: R = lua.from_value(res)?;
    Ok(res)
}
pub fn call_with_cache < ' lua , R : Deserialize < ' lua > > ( lua : & ' lua Lua , func : & str , arg : mlua :: Value < ' lua > , ) -> Result < R > { let caller : mlua :: Function = resolve_fn ( & lua . globals ( ) , " " ) ? ; let func = format ! ( " " func ) ; let func : mlua :: Function = resolve_fn ( & lua . globals ( ) , & func ) ? ; let res : mlua :: Value = caller . call ( ( func , arg ) ) ? ; let res : R = lua . from_value ( res ) ? ; Ok ( res ) }
Used to call lua functions with cache support.
Used to call lua functions with cache support .
lua
&'lua Lua
func
&str
arg
mlua::Value<'lua>
lua
&'lua Lua
func
&str
arg
mlua::Value<'lua>