Enum tealr::mlu::generics::U

source ·
pub enum U<'lua> {
    Nil,
    Boolean(bool),
    LightUserData(LightUserData),
    Integer(Integer),
    Number(Number),
    String(String<'lua>),
    Table(Table<'lua>),
    Function(Function<'lua>),
    Thread(Thread<'lua>),
    UserData(AnyUserData<'lua>),
    Error(Error),
}

Variants§

§

Nil

§

Boolean(bool)

§

LightUserData(LightUserData)

§

Integer(Integer)

§

Number(Number)

§

String(String<'lua>)

§

Table(Table<'lua>)

§

Function(Function<'lua>)

§

Thread(Thread<'lua>)

§

UserData(AnyUserData<'lua>)

§

Error(Error)

Trait Implementations§

source§

impl<'lua> Clone for U<'lua>

source§

fn clone(&self) -> U<'lua>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'lua> Debug for U<'lua>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'lua> From<U<'lua>> for Value<'lua>

source§

fn from(value: U<'lua>) -> Value<'lua>

Converts to this type from the input type.
source§

impl<'lua> From<Value<'lua>> for U<'lua>

source§

fn from(value: Value<'lua>) -> U<'_>

Converts to this type from the input type.
source§

impl<'lua> FromIterator<U<'lua>> for MultiValue<'lua>

source§

fn from_iter<__MacroIterGeneric: IntoIterator<Item = U<'lua>>>( iter: __MacroIterGeneric ) -> Self

Creates a value from an iterator. Read more
source§

impl<'lua> FromLua<'lua> for U<'lua>

source§

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

Performs the conversion.
source§

impl<'lua> IntoLua<'lua> for U<'lua>

source§

fn into_lua(self, _: &'lua Lua) -> Result<Value<'lua>, Error>

Performs the conversion.
source§

impl<'lua> PartialEq<Value<'lua>> for U<'lua>

source§

fn eq(&self, other: &Value<'lua>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'lua> PartialEq for U<'lua>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'lua> ToTypename for U<'lua>

source§

fn to_typename() -> Type

generates the type representation
source§

fn to_old_type_parts() -> Cow<'static, [NamePart]>

👎Deprecated
Used to get the old representation. Should basically never be used or implemented manually
source§

fn to_function_param() -> Vec<FunctionParam>

generates the type representation when used as a parameter By default will assume no name was given Read more

Auto Trait Implementations§

§

impl<'lua> !RefUnwindSafe for U<'lua>

§

impl<'lua> !Send for U<'lua>

§

impl<'lua> !Sync for U<'lua>

§

impl<'lua> Unpin for U<'lua>

§

impl<'lua> !UnwindSafe for U<'lua>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<'lua, T> FromLuaMulti<'lua> for T
where T: FromLua<'lua>,

source§

fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>

Performs the conversion. Read more
source§

fn from_lua_args( args: MultiValue<'lua>, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>

source§

unsafe fn from_stack_multi(nvals: i32, lua: &'lua Lua) -> Result<T, Error>

source§

unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'lua, T> IntoLuaMulti<'lua> for T
where T: IntoLua<'lua>,

source§

fn into_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>

Performs the conversion.
source§

unsafe fn push_into_stack_multi(self, lua: &'lua Lua) -> Result<i32, Error>

source§

impl<A> TealMultiValue for A
where A: ToTypename,

source§

fn get_types_as_params() -> Vec<FunctionParam>

Gets the type representations as used for function parameters
source§

fn get_types() -> Vec<Type>

Gets the types contained in this collection. Order IS important.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> TypeName for T
where T: ToTypename,

source§

fn get_type_parts() -> Cow<'static, [NamePart]>

returns the type name as how it should show up in the generated .d.tl file
source§

fn get_type_parts_as_global() -> Cow<'static, [NamePart]>

Generates the typename when used to describe a global value. Read more
source§

fn get_type_kind() -> KindOfType

This method tells the generator if this type is builtin to teal/lua, if it comes from somewhere else or if it stands in as a generic Read more
source§

fn collect_children(_: &mut Vec<TealType>)

Creates/updates a list of every child type this type has This is used to properly label methods/functions as being generic.
source§

impl<T> MaybeSend for T