Enum rlua::LuaValue
[−]
[src]
pub enum LuaValue<'lua> { Nil, Boolean(bool), LightUserData(LightUserData), Integer(LuaInteger), Number(LuaNumber), String(LuaString<'lua>), Table(LuaTable<'lua>), Function(LuaFunction<'lua>), Thread(LuaThread<'lua>), UserData(LuaUserData<'lua>), Error(LuaError), }
A dynamically typed Lua value.
Variants
Nil
The Lua value nil
.
Boolean(bool)
The Lua value true
or false
.
LightUserData(LightUserData)
A "light userdata" object, equivalent to a raw pointer.
Integer(LuaInteger)
An integer number.
Any Lua number convertible to a LuaInteger
will be represented as this variant.
Number(LuaNumber)
A floating point number.
String(LuaString<'lua>)
An interned string, managed by Lua.
Unlike Rust strings, Lua strings may not be valid UTF-8.
Table(LuaTable<'lua>)
Reference to a Lua table.
Function(LuaFunction<'lua>)
Reference to a Lua function (or closure).
Thread(LuaThread<'lua>)
Reference to a Lua thread (or coroutine).
UserData(LuaUserData<'lua>)
Reference to a userdata object that holds a custom type which implements
LuaUserDataType
. Special builtin userdata types will be represented as
other LuaValue
variants.
Error(LuaError)
LuaError
is a special builtin userdata type. When received from Lua
it is implicitly cloned.
Trait Implementations
impl<'lua> Debug for LuaValue<'lua>
[src]
impl<'lua> Clone for LuaValue<'lua>
[src]
fn clone(&self) -> LuaValue<'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