pub trait FromLua: Sized {
    const TYPE_NAME: &'static str = core::any::type_name::();

    fn from_lua(s: &State, i: Index) -> Option<Self>;

    fn check(s: &State, i: Index) -> Self { ... }
}
Expand description

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.

Provided Associated Constants

Required Methods

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

Provided Methods

Implementations on Foreign Types

Implementors