Struct luaext::types::userdata::LuaUserdata [] [src]

pub struct LuaUserdata { /* fields omitted */ }

Represents user-defined data on the Lua stack

Note that without a __gc metamethod, any data contained in the userdata that implements the Drop trait will not be dropped, which although not unsafe, may result in memory leaks. This includes types such as HashMap and Vec.

Methods

impl LuaUserdata
[src]

Create a new LuaUserdata at the given index

Set this userdata's metatable.

Get a mutable reference to this userdata's contained data.

Get a mutable reference to this userdata's contained data, given that its metatable matches the given name.

Trait Implementations

impl LuaStackable for LuaUserdata
[src]

Get the position of this value on the stack

impl ToLua for LuaUserdata
[src]

Pushes a value of type Self onto the stack of a Lua state.

impl FromLua for LuaUserdata
[src]

Converts the value on top of the stack of a Lua state to a value of type Option<Self>. Read more