Struct mlua::RegistryKey
source · pub struct RegistryKey { /* private fields */ }
Expand description
An auto generated key into the Lua registry.
This is a handle to a value stored inside the Lua registry. It is not automatically
garbage collected on Drop, but it can be removed with Lua::remove_registry_value
,
and instances not manually removed can be garbage collected with Lua::expire_registry_values
.
Be warned, If you place this into Lua via a UserData
type or a rust callback, it is very
easy to accidentally cause reference cycles that the Lua garbage collector cannot resolve.
Instead of placing a RegistryKey
into a UserData
type, prefer instead to use
AnyUserData::set_user_value
/ AnyUserData::user_value
.
Trait Implementations§
source§impl Debug for RegistryKey
impl Debug for RegistryKey
source§impl Drop for RegistryKey
impl Drop for RegistryKey
source§impl<'lua> FromLua<'lua> for RegistryKey
impl<'lua> FromLua<'lua> for RegistryKey
source§impl Hash for RegistryKey
impl Hash for RegistryKey
source§impl<'lua> IntoLua<'lua> for &RegistryKey
impl<'lua> IntoLua<'lua> for &RegistryKey
source§impl<'lua> IntoLua<'lua> for RegistryKey
impl<'lua> IntoLua<'lua> for RegistryKey
source§impl PartialEq for RegistryKey
impl PartialEq for RegistryKey
source§fn eq(&self, other: &RegistryKey) -> bool
fn eq(&self, other: &RegistryKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RegistryKey
Auto Trait Implementations§
impl !Freeze for RegistryKey
impl RefUnwindSafe for RegistryKey
impl Send for RegistryKey
impl Sync for RegistryKey
impl Unpin for RegistryKey
impl UnwindSafe for RegistryKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'lua, T> FromLuaMulti<'lua> for Twhere
T: FromLua<'lua>,
impl<'lua, T> FromLuaMulti<'lua> for Twhere
T: FromLua<'lua>,
source§fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
Performs the conversion. Read more
fn from_lua_args( args: MultiValue<'lua>, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>
unsafe fn from_stack_multi(nvals: i32, lua: &'lua Lua) -> Result<T, Error>
unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>
source§impl<'lua, T> IntoLuaMulti<'lua> for Twhere
T: IntoLua<'lua>,
impl<'lua, T> IntoLuaMulti<'lua> for Twhere
T: IntoLua<'lua>,
source§fn into_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
fn into_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
Performs the conversion.