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 easy
to accidentally cause reference cycles that the Lua garbage collector cannot resolve. Instead of
placing a RegistryKey
into a UserData
type, consider to use
AnyUserData::set_user_value
.
Implementations§
Trait Implementations§
Source§impl Debug for RegistryKey
impl Debug for RegistryKey
Source§impl Drop for RegistryKey
impl Drop for RegistryKey
Source§impl FromLua for RegistryKey
impl FromLua for RegistryKey
Source§impl Hash for RegistryKey
impl Hash for RegistryKey
Source§impl IntoLua for &RegistryKey
impl IntoLua for &RegistryKey
Source§impl IntoLua for RegistryKey
impl IntoLua for RegistryKey
Source§impl PartialEq for RegistryKey
impl PartialEq for RegistryKey
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<T> FromLuaMulti for Twhere
T: FromLua,
impl<T> FromLuaMulti for Twhere
T: FromLua,
Source§fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
Performs the conversion. Read more
fn from_lua_args( args: MultiValue, i: usize, to: Option<&str>, lua: &Lua, ) -> Result<T, Error>
unsafe fn from_stack_multi(nvals: i32, lua: &RawLua) -> Result<T, Error>
unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &RawLua, ) -> Result<T, Error>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
Source§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.