ToLua

Trait ToLua 

Source
pub trait ToLua: Sized {
    // Required method
    fn push_to_stack(self, state: &State);

    // Provided method
    fn to_value(self, state: &State) -> Value { ... }
}

Required Methods§

Source

fn push_to_stack(self, state: &State)

Pushes the value onto the Lua stack.

Provided Methods§

Source

fn to_value(self, state: &State) -> Value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToLua for &str

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for &CString

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for &String

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for &CStr

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for &BStr

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for &BString

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for bool

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for f32

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for f64

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for i8

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for i16

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for i32

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for i64

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for i128

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for isize

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for u8

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for u16

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for u32

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for u64

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for u128

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for ()

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for usize

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for CString

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for String

Source§

fn push_to_stack(self, state: &State)

Source§

impl ToLua for BString

Source§

fn push_to_stack(self, state: &State)

Source§

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

Source§

fn push_to_stack(self, state: &State)

Implementors§