pub type AppState = LuaValue;
Aliased Type§
pub enum AppState {
Nil,
Boolean(bool),
LightUserData(LightUserData),
Integer(i64),
Number(f64),
String(String),
Table(Table),
Function(Function),
Thread(Thread),
UserData(AnyUserData),
Error(Box<Error>),
Other(),
}
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(i64)
An integer number.
Any Lua number convertible to a Integer
will be represented as this variant.
Number(f64)
A floating point number.
String(String)
An interned string, managed by Lua.
Unlike Rust strings, Lua strings may not be valid UTF-8.
Table(Table)
Reference to a Lua table.
Function(Function)
Reference to a Lua function (or closure).
Thread(Thread)
Reference to a Lua thread (or coroutine).
UserData(AnyUserData)
Reference to a userdata object that holds a custom type which implements UserData
.
Special builtin userdata types will be represented as other Value
variants.
Error(Box<Error>)
Error
is a special builtin userdata type. When received from Lua it is implicitly cloned.
Other()
Any other value not known to mlua (eg. LuaJIT CData).