pub fn in_context<'lua, T>(
        &self,
        lua: &'lua Lua,
        resources: &Resources,
        script_context: &mut ScriptContext,
        thunk: impl FnOnce(&'lua Lua, &Resources, LuaTable<'lua>) -> Result<T>,
    ) -> Result<T> {
        script_context.with_resources(lua, resources, |_| {
            let table: LuaTable = lua.registry_value(&self.table)?;
            thunk(lua, resources, table)
        })?
    }
/// Enter the script context, mutably loan the `World` to the `Resources` (if it's configured to
/// accept such a loan), load the Lua table representing the script, and then run a closure w/
/// access to the Lua context, resources, and script table.
Enter the script context, mutably loan the `World` to the `Resources` (if it's configured to
accept such a loan), load the Lua table representing the script, and then run a closure w
access to the Lua context, resources, and script table.
Enter the script context mutably loan the ` World ` to the ` Resources ` ( if it ' s configured to accept such a loan ) load the Lua table representing the script and then run a closure w access to the Lua context resources and script table .
pub fn in_context<'lua, T>(
        &self,
        lua: &'lua Lua,
        resources: &Resources,
        script_context: &mut ScriptContext,
        thunk: impl FnOnce(&'lua Lua, &Resources, LuaTable<'lua>) -> Result<T>,
    ) -> Result<T> {
        script_context.with_resources(lua, resources, |_| {
            let table: LuaTable = lua.registry_value(&self.table)?;
            thunk(lua, resources, table)
        })?
    }
pub fn in_context < ' lua , T > ( & self , lua : & ' lua Lua , resources : & Resources , script_context : & mut ScriptContext , thunk : impl FnOnce ( & ' lua Lua , & Resources , LuaTable < ' lua > ) -> Result < T > , ) -> Result < T > { script_context . with_resources ( lua , resources , | _ | { let table : LuaTable = lua . registry_value ( & self . table ) ? ; thunk ( lua , resources , table ) } ) ? }
Enter the script context, mutably loan the `World` to the `Resources` (if it's configured to
accept such a loan), load the Lua table representing the script, and then run a closure w
access to the Lua context, resources, and script table.
Enter the script context mutably loan the ` World ` to the ` Resources ` ( if it ' s configured to accept such a loan ) load the Lua table representing the script and then run a closure w access to the Lua context resources and script table .
&self
lua
&'lua Lua
resources
&Resources
script_context
&mut ScriptContext
thunk
impl FnOnce(&'lua Lua, &Resources, LuaTable<'lua>) -> Result<T>
&self
lua
&'lua Lua
resources
&Resources
script_context
&mut ScriptContext
thunk
impl FnOnce(&'lua Lua, &Resources, LuaTable<'lua>) -> Result<T>