pub trait LuaRegistrable {
// Required method
fn lua_static_methods() -> &'static [(&'static str, CFunction)];
}Expand description
Trait for types that can be registered with Lua via register_type_of::<T>.
This trait is explicitly implemented by #[lua_methods] (no blanket impl),
so T::lua_static_methods() dispatches to the actual generated methods.
Unlike LuaStaticMethodProvider (which has a blanket impl that always
returns &[]), this trait guarantees that the type has real method info.
Required Methods§
Sourcefn lua_static_methods() -> &'static [(&'static str, CFunction)]
fn lua_static_methods() -> &'static [(&'static str, CFunction)]
Return all static (associated) methods for type registration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.