Trait ToLua

Source
pub trait ToLua {
    // Required method
    fn to_lua(&self, state: &mut State);
}
Expand description

Trait for types that can be pushed onto the stack of a Lua state.

It is important that implementors of this trait ensure that to_lua behaves like one of the lua_push* functions for consistency.

Required Methods§

Source

fn to_lua(&self, state: &mut State)

Pushes a value of type Self onto the stack of a Lua state.

Implementations on Foreign Types§

Source§

impl ToLua for bool

Source§

fn to_lua(&self, state: &mut State)

Source§

impl ToLua for String

Source§

fn to_lua(&self, state: &mut State)

Source§

impl<'a> ToLua for &'a str

Source§

fn to_lua(&self, state: &mut State)

Source§

impl<T> ToLua for *mut T

Source§

fn to_lua(&self, state: &mut State)

Source§

impl<T: ToLua> ToLua for Option<T>

Source§

fn to_lua(&self, state: &mut State)

Implementors§