pub enum LuaType {
Show 43 variants
Unknown,
Any,
Nil,
Table,
Userdata,
Function,
Thread,
Boolean,
String,
Integer,
Number,
Io,
SelfInfer,
Global,
BooleanConst(bool),
StringConst(ArcIntern<SmolStr>),
IntegerConst(i64),
FloatConst(f64),
TableConst(InFiled<TextRange>),
Ref(LuaTypeDeclId),
Def(LuaTypeDeclId),
Module(ArcIntern<SmolStr>),
Array(Arc<LuaType>),
KeyOf(Arc<LuaType>),
Nullable(Arc<LuaType>),
Tuple(Arc<LuaTupleType>),
DocFunction(Arc<LuaFunctionType>),
Object(Arc<LuaObjectType>),
Union(Arc<LuaUnionType>),
Intersection(Arc<LuaIntersectionType>),
Extends(Arc<LuaExtendedType>),
Generic(Arc<LuaGenericType>),
TableGeneric(Arc<Vec<LuaType>>),
TplRef(Arc<GenericTpl>),
StrTplRef(Arc<LuaStringTplType>),
MuliReturn(Arc<LuaMultiReturn>),
ExistField(Arc<LuaExistFieldType>),
Signature(LuaSignatureId),
Instance(Arc<LuaInstanceType>),
DocStringConst(ArcIntern<SmolStr>),
DocIntegerConst(i64),
Namespace(ArcIntern<SmolStr>),
Variadic(Arc<LuaType>),
}Variants§
Unknown
Any
Nil
Table
Userdata
Function
Thread
Boolean
String
Integer
Number
Io
SelfInfer
Global
BooleanConst(bool)
StringConst(ArcIntern<SmolStr>)
IntegerConst(i64)
FloatConst(f64)
TableConst(InFiled<TextRange>)
Ref(LuaTypeDeclId)
Def(LuaTypeDeclId)
Module(ArcIntern<SmolStr>)
Array(Arc<LuaType>)
KeyOf(Arc<LuaType>)
Nullable(Arc<LuaType>)
Tuple(Arc<LuaTupleType>)
DocFunction(Arc<LuaFunctionType>)
Object(Arc<LuaObjectType>)
Union(Arc<LuaUnionType>)
Intersection(Arc<LuaIntersectionType>)
Extends(Arc<LuaExtendedType>)
Generic(Arc<LuaGenericType>)
TableGeneric(Arc<Vec<LuaType>>)
TplRef(Arc<GenericTpl>)
StrTplRef(Arc<LuaStringTplType>)
MuliReturn(Arc<LuaMultiReturn>)
ExistField(Arc<LuaExistFieldType>)
Signature(LuaSignatureId)
Instance(Arc<LuaInstanceType>)
DocStringConst(ArcIntern<SmolStr>)
DocIntegerConst(i64)
Namespace(ArcIntern<SmolStr>)
Variadic(Arc<LuaType>)
Implementations§
Source§impl LuaType
impl LuaType
pub fn is_unknown(&self) -> bool
pub fn is_nil(&self) -> bool
pub fn is_table(&self) -> bool
pub fn is_userdata(&self) -> bool
pub fn is_thread(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_io(&self) -> bool
pub fn is_ref(&self) -> bool
pub fn is_def(&self) -> bool
pub fn is_custom_type(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_key_of(&self) -> bool
pub fn is_nullable(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_tuple(&self) -> bool
pub fn is_function(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_union(&self) -> bool
pub fn is_intersection(&self) -> bool
pub fn is_extends(&self) -> bool
pub fn is_generic(&self) -> bool
pub fn is_table_generic(&self) -> bool
pub fn is_class_tpl(&self) -> bool
pub fn is_str_tpl_ref(&self) -> bool
pub fn is_tpl(&self) -> bool
pub fn is_self_infer(&self) -> bool
pub fn is_any(&self) -> bool
pub fn is_const(&self) -> bool
pub fn is_module(&self) -> bool
pub fn is_multi_return(&self) -> bool
pub fn is_exist_field(&self) -> bool
pub fn is_global(&self) -> bool
pub fn contain_tpl(&self) -> bool
pub fn is_namespace(&self) -> bool
pub fn is_variadic(&self) -> bool
Trait Implementations§
Source§impl From<LuaExtendedType> for LuaType
impl From<LuaExtendedType> for LuaType
Source§fn from(t: LuaExtendedType) -> Self
fn from(t: LuaExtendedType) -> Self
Converts to this type from the input type.
Source§impl From<LuaFunctionType> for LuaType
impl From<LuaFunctionType> for LuaType
Source§fn from(t: LuaFunctionType) -> Self
fn from(t: LuaFunctionType) -> Self
Converts to this type from the input type.
Source§impl From<LuaGenericType> for LuaType
impl From<LuaGenericType> for LuaType
Source§fn from(t: LuaGenericType) -> Self
fn from(t: LuaGenericType) -> Self
Converts to this type from the input type.
Source§impl From<LuaIntersectionType> for LuaType
impl From<LuaIntersectionType> for LuaType
Source§fn from(t: LuaIntersectionType) -> Self
fn from(t: LuaIntersectionType) -> Self
Converts to this type from the input type.
Source§impl From<LuaObjectType> for LuaType
impl From<LuaObjectType> for LuaType
Source§fn from(t: LuaObjectType) -> Self
fn from(t: LuaObjectType) -> Self
Converts to this type from the input type.
Source§impl From<LuaTupleType> for LuaType
impl From<LuaTupleType> for LuaType
Source§fn from(t: LuaTupleType) -> Self
fn from(t: LuaTupleType) -> Self
Converts to this type from the input type.
Source§impl From<LuaUnionType> for LuaType
impl From<LuaUnionType> for LuaType
Source§fn from(t: LuaUnionType) -> Self
fn from(t: LuaUnionType) -> Self
Converts to this type from the input type.
impl Eq for LuaType
Auto Trait Implementations§
impl Freeze for LuaType
impl RefUnwindSafe for LuaType
impl Send for LuaType
impl Sync for LuaType
impl Unpin for LuaType
impl UnwindSafe for LuaType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more