Struct luaext::types::generic::LuaGeneric [] [src]

pub struct LuaGeneric { /* fields omitted */ }

Represents a generic lua value on the Lua stack

Can represent any possible lua value, and can be converted to a usable value.

Examples

context.push_integer(4);
let generic: LuaGeneric = context.get_arg(1).unwrap();
assert_eq!(Some(4), generic.get_value(&mut context));

Methods

impl LuaGeneric
[src]

Create a new LuaGeneric given an index

Gets the Lua type of this generic object

Convert the contained value of this generic object to a given type

Trait Implementations

impl LuaStackable for LuaGeneric
[src]

Get the position of this value on the stack

impl ToLua for LuaGeneric
[src]

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

impl FromLua for LuaGeneric
[src]

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