Enum hlua::AnyLuaValue
[−]
[src]
pub enum AnyLuaValue { LuaString(String), LuaAnyString(AnyLuaString), LuaNumber(f64), LuaBoolean(bool), LuaArray(Vec<(AnyLuaValue, AnyLuaValue)>), LuaNil, LuaOther, }
Represents any value that can be stored by Lua
Variants
LuaString(String)
LuaAnyString(AnyLuaString)
LuaNumber(f64)
LuaBoolean(bool)
LuaArray(Vec<(AnyLuaValue, AnyLuaValue)>)
LuaNil
LuaOther
The "Other" element is (hopefully) temporary and will be replaced by "Function" and "Userdata". A panic! will trigger if you try to push a Other.
Trait Implementations
impl Clone for AnyLuaValue
[src]
fn clone(&self) -> AnyLuaValue
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 Debug for AnyLuaValue
[src]
impl PartialEq for AnyLuaValue
[src]
fn eq(&self, __arg_0: &AnyLuaValue) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AnyLuaValue) -> bool
This method tests for !=
.
impl<'lua, L> Push<L> for AnyLuaValue where
L: AsMutLua<'lua>,
[src]
L: AsMutLua<'lua>,
type Err = Void
Error that can happen when pushing a value.
fn push_to_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>
Pushes the value on the top of the stack. Read more
fn push_no_err<E>(self, lua: L) -> PushGuard<L> where
Self: Sized,
Self: Push<L, Err = E>,
E: Into<Void>,
Self: Sized,
Self: Push<L, Err = E>,
E: Into<Void>,
Same as push_to_lua
but can only succeed and is only available if Err
is Void
.
impl<'lua, L> PushOne<L> for AnyLuaValue where
L: AsMutLua<'lua>,
[src]
L: AsMutLua<'lua>,
impl<'lua, L> LuaRead<L> for AnyLuaValue where
L: AsLua<'lua>,
[src]
L: AsLua<'lua>,
fn lua_read_at_position(lua: L, index: i32) -> Result<AnyLuaValue, L>
Reads the data from Lua at a given position.
fn lua_read(lua: L) -> Result<Self, L>
Reads the data from Lua.