Trait lua::FromLua
[−]
[src]
pub trait FromLua: Sized { fn from_lua(state: &mut State, index: Index) -> Option<Self>; }
Trait for types that can be taken from the Lua stack.
It is important that implementors of this trait ensure that from_lua
behaves like one of the lua_to*
functions for consistency.
Required Methods
fn from_lua(state: &mut State, index: Index) -> Option<Self>
Converts the value on top of the stack of a Lua state to a value of type
Option<Self>
.