Skip to main content

IntoRustia

Trait IntoRustia 

Source
pub trait IntoRustia {
    // Required method
    fn into_rustia(self) -> Result<OwnedValue>;
}
Expand description

Converts a Rust value to an owned script value.

Implementations include numbers, strings, Option<T>, Vec<T>, and BTreeMap<String, T>. None becomes nil; vectors become one-based Luau sequences. Integer conversions reject values that cannot be represented exactly as a Luau number.

Required Methods§

Source

fn into_rustia(self) -> Result<OwnedValue>

Converts this value, returning an error if it cannot be represented.

Implementations on Foreign Types§

Source§

impl IntoRustia for &str

Source§

impl IntoRustia for bool

Source§

impl IntoRustia for f32

Source§

impl IntoRustia for f64

Source§

impl IntoRustia for i8

Source§

impl IntoRustia for i16

Source§

impl IntoRustia for i32

Source§

impl IntoRustia for i64

Source§

impl IntoRustia for isize

Source§

impl IntoRustia for u8

Source§

impl IntoRustia for u16

Source§

impl IntoRustia for u32

Source§

impl IntoRustia for u64

Source§

impl IntoRustia for ()

Source§

impl IntoRustia for usize

Source§

impl IntoRustia for String

Source§

impl<T> IntoRustia for Option<T>
where T: IntoRustia,

Source§

impl<T> IntoRustia for BTreeMap<String, T>
where T: IntoRustia,

Source§

impl<T> IntoRustia for Vec<T>
where T: IntoRustia,

Implementors§