Skip to main content

IntoLua

Trait IntoLua 

Source
pub trait IntoLua {
    // Required method
    fn into_lua(self, state: &mut LuaState) -> Result<usize, String>;
}
Expand description

Convert a Rust type into a LuaValue and push it.

Implementors define how self becomes one or more Lua values on the stack. Returns the number of values pushed (typically 1, or 0 for ()).

Required Methods§

Source

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Push this value onto the Lua stack.

Returns the number of Lua values pushed.

Implementations on Foreign Types§

Source§

impl IntoLua for &str

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for bool

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for f32

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for f64

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for i8

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for i16

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for i32

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for i64

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for isize

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for u8

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for u16

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for u32

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for u64

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for ()

Source§

fn into_lua(self, _state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for usize

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl IntoLua for String

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl<T: IntoLua> IntoLua for Option<T>

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl<T: IntoLua> IntoLua for Vec<T>

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Source§

impl<T: IntoLua, E: Display> IntoLua for Result<T, E>

Source§

fn into_lua(self, state: &mut LuaState) -> Result<usize, String>

Implementors§