Trait hlua::LuaRead [] [src]

pub trait LuaRead<L>: Sized where L: AsLua {
    fn lua_read_at_position(lua: L, index: i32) -> Result<Self, L>;

    fn lua_read(lua: L) -> Result<Self, L> { ... }
}

Types that can be obtained from a Lua context.

Most types that implement Push also implement LuaRead, but this is not always the case (for example &'static str implements Push but not LuaRead).

Required Methods

fn lua_read_at_position(lua: L, index: i32) -> Result<Self, L>

Reads the data from Lua at a given position.

Provided Methods

fn lua_read(lua: L) -> Result<Self, L>

Reads the data from Lua.

Implementors