pub enum LuaType {
Show 45 variants
Unknown,
Any,
Nil,
Table,
Userdata,
Function,
Thread,
Boolean,
String,
Integer,
Number,
Io,
SelfInfer,
Global,
Never,
BooleanConst(bool),
StringConst(ArcIntern<SmolStr>),
IntegerConst(i64),
FloatConst(f64),
TableConst(InFiled<TextRange>),
Ref(LuaTypeDeclId),
Def(LuaTypeDeclId),
Array(Arc<LuaArrayType>),
Tuple(Arc<LuaTupleType>),
DocFunction(Arc<LuaFunctionType>),
Object(Arc<LuaObjectType>),
Union(Arc<LuaUnionType>),
Intersection(Arc<LuaIntersectionType>),
Generic(Arc<LuaGenericType>),
TableGeneric(Arc<Vec<LuaType>>),
TplRef(Arc<GenericTpl>),
StrTplRef(Arc<LuaStringTplType>),
Variadic(Arc<VariadicType>),
Signature(LuaSignatureId),
Instance(Arc<LuaInstanceType>),
DocStringConst(ArcIntern<SmolStr>),
DocIntegerConst(i64),
DocBooleanConst(bool),
Namespace(ArcIntern<SmolStr>),
Call(Arc<LuaAliasCallType>),
MultiLineUnion(Arc<LuaMultiLineUnion>),
TypeGuard(Arc<LuaType>),
ConstTplRef(Arc<GenericTpl>),
Language(ArcIntern<SmolStr>),
ModuleRef(FileId),
}Variants§
Unknown
Any
Nil
Table
Userdata
Function
Thread
Boolean
String
Integer
Number
Io
SelfInfer
Global
Never
BooleanConst(bool)
StringConst(ArcIntern<SmolStr>)
IntegerConst(i64)
FloatConst(f64)
TableConst(InFiled<TextRange>)
Ref(LuaTypeDeclId)
Def(LuaTypeDeclId)
Array(Arc<LuaArrayType>)
Tuple(Arc<LuaTupleType>)
DocFunction(Arc<LuaFunctionType>)
Object(Arc<LuaObjectType>)
Union(Arc<LuaUnionType>)
Intersection(Arc<LuaIntersectionType>)
Generic(Arc<LuaGenericType>)
TableGeneric(Arc<Vec<LuaType>>)
TplRef(Arc<GenericTpl>)
StrTplRef(Arc<LuaStringTplType>)
Variadic(Arc<VariadicType>)
Signature(LuaSignatureId)
Instance(Arc<LuaInstanceType>)
DocStringConst(ArcIntern<SmolStr>)
DocIntegerConst(i64)
DocBooleanConst(bool)
Namespace(ArcIntern<SmolStr>)
Call(Arc<LuaAliasCallType>)
MultiLineUnion(Arc<LuaMultiLineUnion>)
TypeGuard(Arc<LuaType>)
ConstTplRef(Arc<GenericTpl>)
Language(ArcIntern<SmolStr>)
ModuleRef(FileId)
Implementations§
Source§impl LuaType
impl LuaType
pub fn is_unknown(&self) -> bool
pub fn is_nil(&self) -> bool
pub fn is_never(&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_nullable(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_always_truthy(&self) -> bool
pub fn is_always_falsy(&self) -> bool
pub fn is_tuple(&self) -> bool
pub fn is_function(&self) -> bool
pub fn is_signature(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_union(&self) -> bool
pub fn is_intersection(&self) -> bool
pub fn is_call(&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_multi_return(&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
pub fn is_member_owner(&self) -> bool
pub fn is_type_guard(&self) -> bool
pub fn is_multi_line_union(&self) -> bool
pub fn from_vec(types: Vec<LuaType>) -> Self
Trait Implementations§
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.
Source§impl TypeVisitTrait for LuaType
impl TypeVisitTrait for LuaType
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