Trait tlua::LuaRead

source ·
pub trait LuaRead<L>: Sized {
    fn lua_read_at_position(lua: L, index: NonZeroI32) -> Result<Self, L>;

    fn n_values_expected() -> i32 { ... }
    fn lua_read(lua: L) -> Result<Self, L> { ... }
    fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> Result<Self, L> { ... }
}
Expand description

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§

Reads the data from Lua at a given position.

Provided Methods§

Reads the data from Lua.

Implementations on Foreign Types§

HashMap

Implementors§