FromLua

Trait FromLua 

pub trait FromLua: Sized {
    // Required method
    fn from_lua(value: Value, lua: &Lua) -> Result<Self, Error>;
}
Expand description

Trait for types convertible from Value.

Required Methods§

fn from_lua(value: Value, lua: &Lua) -> Result<Self, Error>

Performs the conversion.

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§

§

impl FromLua for bool

§

fn from_lua(v: Value, _: &Lua) -> Result<bool, Error>

§

impl FromLua for char

§

fn from_lua(value: Value, _lua: &Lua) -> Result<char, Error>

§

impl FromLua for f32

§

fn from_lua(value: Value, lua: &Lua) -> Result<f32, Error>

§

impl FromLua for f64

§

fn from_lua(value: Value, lua: &Lua) -> Result<f64, Error>

§

impl FromLua for i8

§

fn from_lua(value: Value, lua: &Lua) -> Result<i8, Error>

§

impl FromLua for i16

§

fn from_lua(value: Value, lua: &Lua) -> Result<i16, Error>

§

impl FromLua for i32

§

fn from_lua(value: Value, lua: &Lua) -> Result<i32, Error>

§

impl FromLua for i64

§

fn from_lua(value: Value, lua: &Lua) -> Result<i64, Error>

§

impl FromLua for i128

§

fn from_lua(value: Value, lua: &Lua) -> Result<i128, Error>

§

impl FromLua for isize

§

fn from_lua(value: Value, lua: &Lua) -> Result<isize, Error>

§

impl FromLua for u8

§

fn from_lua(value: Value, lua: &Lua) -> Result<u8, Error>

§

impl FromLua for u16

§

fn from_lua(value: Value, lua: &Lua) -> Result<u16, Error>

§

impl FromLua for u32

§

fn from_lua(value: Value, lua: &Lua) -> Result<u32, Error>

§

impl FromLua for u64

§

fn from_lua(value: Value, lua: &Lua) -> Result<u64, Error>

§

impl FromLua for u128

§

fn from_lua(value: Value, lua: &Lua) -> Result<u128, Error>

§

impl FromLua for usize

§

fn from_lua(value: Value, lua: &Lua) -> Result<usize, Error>

§

impl FromLua for Box<str>

§

fn from_lua(value: Value, lua: &Lua) -> Result<Box<str>, Error>

§

impl FromLua for CString

§

fn from_lua(value: Value, lua: &Lua) -> Result<CString, Error>

§

impl FromLua for String

§

fn from_lua(value: Value, lua: &Lua) -> Result<String, Error>

§

impl FromLua for OsString

§

fn from_lua(value: Value, lua: &Lua) -> Result<OsString, Error>

§

impl FromLua for PathBuf

§

fn from_lua(value: Value, lua: &Lua) -> Result<PathBuf, Error>

§

impl<K, V> FromLua for BTreeMap<K, V>
where K: Ord + FromLua, V: FromLua,

§

fn from_lua(value: Value, _: &Lua) -> Result<BTreeMap<K, V>, Error>

§

impl<K, V, S> FromLua for HashMap<K, V, S>
where K: Eq + Hash + FromLua, V: FromLua, S: BuildHasher + Default,

§

fn from_lua(value: Value, _: &Lua) -> Result<HashMap<K, V, S>, Error>

§

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

§

fn from_lua(value: Value, lua: &Lua) -> Result<Option<T>, Error>

§

impl<T> FromLua for Box<[T]>
where T: FromLua,

§

fn from_lua(value: Value, lua: &Lua) -> Result<Box<[T]>, Error>

§

impl<T> FromLua for BTreeSet<T>
where T: Ord + FromLua,

§

fn from_lua(value: Value, _: &Lua) -> Result<BTreeSet<T>, Error>

§

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

§

fn from_lua(value: Value, _lua: &Lua) -> Result<Vec<T>, Error>

§

impl<T, S> FromLua for HashSet<T, S>
where T: Eq + Hash + FromLua, S: BuildHasher + Default,

§

fn from_lua(value: Value, _: &Lua) -> Result<HashSet<T, S>, Error>

§

impl<T, const N: usize> FromLua for [T; N]
where T: FromLua,

§

fn from_lua(value: Value, _lua: &Lua) -> Result<[T; N], Error>

Implementors§

§

impl FromLua for Error

§

impl FromLua for Value

§

impl FromLua for AnyUserData

§

impl FromLua for BString

§

impl FromLua for BorrowedBytes<'_>

§

impl FromLua for BorrowedStr<'_>

§

impl FromLua for Function

§

impl FromLua for LightUserData

§

impl FromLua for RegistryKey

§

impl FromLua for ytil_noxi::mlua::String

§

impl FromLua for Table

§

impl FromLua for Thread

§

impl<L, R> FromLua for Either<L, R>
where L: FromLua, R: FromLua,

§

impl<T> FromLua for UserDataRef<T>
where T: 'static,

§

impl<T> FromLua for UserDataRefMut<T>
where T: 'static,