pub trait LuaRead<L>: Sized {
// Required method
fn lua_read_at_position(lua: L, index: i32) -> Result<Self, L>;
// Provided method
fn lua_read(lua: L) -> 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§
sourcefn lua_read_at_position(lua: L, index: i32) -> Result<Self, L>
fn lua_read_at_position(lua: L, index: i32) -> Result<Self, L>
Reads the data from Lua at a given position.
Provided Methods§
Object Safety§
This trait is not object safe.