Function hlua::userdata::push_userdata [] [src]

pub fn push_userdata<L, T, F>(data: T, lua: L, metatable: F) -> PushGuard<L> where F: FnMut(LuaTable<&mut PushGuard<&mut L>>), L: AsMutLua, T: Send + 'static + Any

Pushes an object as a user data.

In Lua, a user data is anything that is not recognized by Lua. When the script attempts to copy a user data, instead only a reference to the data is copied.

The way a Lua script can use the user data depends on the content of the metatable, which is a Lua table linked to the object.

See this link for more infos.

Arguments