[][src]Struct rlua::RegistryKey

pub struct RegistryKey { /* fields omitted */ }

An auto generated key into the Lua registry.

This is a handle to a value stored inside the Lua registry. It is not directly usable like the Table or Function handle types, but since it doesn't hold a reference to a parent Lua and is Send + Sync + 'static, it is much more flexible and can be used in many situations where it is impossible to directly store a normal handle type. It is not automatically garbage collected on Drop, but it can be removed with Context::remove_registry_value, and instances not manually removed can be garbage collected with Context::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 UserData::set_user_value / UserData::get_user_value, and instead of moving a RegistryKey into a callback, prefer Context::scope.

Trait Implementations

impl Drop for RegistryKey
[src]

impl Debug for RegistryKey
[src]

Auto Trait Implementations

impl Send for RegistryKey

impl Sync for RegistryKey

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]