Skip to main content

TypeMetatable

Trait TypeMetatable 

Source
pub trait TypeMetatable: Sealed {
    // Provided methods
    fn set_type_metatable(lua: &Lua, metatable: Option<Table>) { ... }
    fn type_metatable(lua: &Lua) -> Option<Table> { ... }
}
Expand description

Luau built-in types that have a shared, per-type metatable settable via Lua::set_type_metatable. Mirrors mlua’s sealed LuauType trait.

Provided Methods§

Source

fn set_type_metatable(lua: &Lua, metatable: Option<Table>)

Install (or clear) the shared metatable for this type.

Source

fn type_metatable(lua: &Lua) -> Option<Table>

The shared metatable for this type, if installed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TypeMetatable for bool

Source§

impl TypeMetatable for f64

Implementors§