Struct mlua::prelude::LuaUserDataMetatable [−][src]
pub struct LuaUserDataMetatable<'lua>(_);
Expand description
Handle to a UserData
metatable.
Implementations
Gets the value associated to key
from the metatable.
If no value is associated to key
, returns the Nil
value.
Access to restricted metamethods such as __gc
or __metatable
will cause an error.
Sets a key-value pair in the metatable.
If the value is Nil
, this will effectively remove the key
.
Access to restricted metamethods such as __gc
or __metatable
will cause an error.
Setting __index
or __newindex
metamethods is also restricted because their values are cached
for mlua
internal usage.
Checks whether the metatable contains a non-nil value for key
.
Trait Implementations
Auto Trait Implementations
impl<'lua> !RefUnwindSafe for UserDataMetatable<'lua>
impl<'lua> !Send for UserDataMetatable<'lua>
impl<'lua> !Sync for UserDataMetatable<'lua>
impl<'lua> Unpin for UserDataMetatable<'lua>
impl<'lua> !UnwindSafe for UserDataMetatable<'lua>
Blanket Implementations
Mutably borrows from an owned value. Read more