Struct rlua::LuaUserDataMethods [] [src]

pub struct LuaUserDataMethods<T> { /* fields omitted */ }

Methods added will be added to the __index table on the metatable for the userdata, so they can be called as userdata:method(args) as expected. If there are any regular methods, and an "Index" metamethod is given, it will be called as a fallback if the index doesn't match an existing regular method.

Methods

impl<T: LuaUserDataType> LuaUserDataMethods<T>
[src]

Add a regular method as a function which accepts a &T parameter

Add a regular method as a function which accepts a &mut T parameter

Add a regular method as a function which accepts generic arguments, the first argument will always be a LuaUserData of real type T

Add a metamethod as a function which accepts a &T parameter

Add a metamethod as a function which accepts a &mut T parameter

Add a metamethod as a function which accepts generic arguments, the first argument will always be a LuaUserData of real type T