Skip to main content

FromRustia

Trait FromRustia 

Source
pub trait FromRustia: Sized {
    // Required method
    fn from_rustia(value: OwnedValue) -> Result<Self>;
}
Expand description

Converts an owned script value to a Rust value.

Conversions check the requested type rather than applying Luau coercions. Option<T> accepts nil as None; integer types require a finite, whole number in range. Vec<T> requires a sequence without keyed entries, while BTreeMap<String, T> requires string keys without sequence entries.

Required Methods§

Source

fn from_rustia(value: OwnedValue) -> Result<Self>

Converts a value, returning an error for an incompatible type or range.

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 FromRustia for bool

Source§

impl FromRustia for f32

Source§

impl FromRustia for f64

Source§

impl FromRustia for i8

Source§

impl FromRustia for i16

Source§

impl FromRustia for i32

Source§

impl FromRustia for i64

Source§

impl FromRustia for isize

Source§

impl FromRustia for u8

Source§

impl FromRustia for u16

Source§

impl FromRustia for u32

Source§

impl FromRustia for u64

Source§

impl FromRustia for ()

Source§

impl FromRustia for usize

Source§

impl FromRustia for String

Source§

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

Source§

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

Source§

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

Implementors§