Struct rlua::LuaUserData
[−]
[src]
pub struct LuaUserData<'lua>(_);
Handle to an internal Lua userdata for a type that implements LuaUserDataType. Internally,
instances are stored in a RefCell
, to best match the mutable semantics of the Lua language.
Methods
impl<'lua> LuaUserData<'lua>
[src]
fn is<T: LuaUserDataType>(&self) -> bool
Checks whether T
is the type of this userdata.
fn borrow<T: LuaUserDataType>(&self) -> LuaResult<Ref<T>>
Borrow this userdata out of the internal RefCell that is held in lua.
fn borrow_mut<T: LuaUserDataType>(&self) -> LuaResult<RefMut<T>>
Borrow mutably this userdata out of the internal RefCell that is held in lua.
Trait Implementations
impl<'lua> Clone for LuaUserData<'lua>
[src]
fn clone(&self) -> LuaUserData<'lua>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'lua> Debug for LuaUserData<'lua>
[src]
impl<'lua> ToLua<'lua> for LuaUserData<'lua>
[src]
impl<'lua> FromLua<'lua> for LuaUserData<'lua>
[src]
fn from_lua(value: LuaValue<'lua>, _: &'lua Lua) -> LuaResult<LuaUserData<'lua>>
Performs the conversion.