pub enum TypeNode {
Show 22 variants
Keyword(KeywordType),
Literal(TypeLiteral),
Reference(TypeReference),
Union(Vec<Ty>),
Intersection(Vec<Ty>),
Array(Box<Ty>),
Tuple(TupleType),
Object(ObjectType),
Function(FunctionType),
Constructor(ConstructorType),
Query(TypeQuery),
Operator {
operator: TypeOperator,
operand: Box<Ty>,
},
IndexedAccess(IndexedAccessType),
Conditional(ConditionalType),
Mapped(MappedType),
Infer(InferType),
Import(ImportType),
TemplateLiteral(TemplateLiteralType),
Parenthesized(Box<Ty>),
This,
Predicate(TypePredicate),
Missing(MissingNode),
}Expand description
Type syntax is kept in this closed enum so erasure never has to inspect a runtime expression variant.
Variants§
Keyword(KeywordType)
Literal(TypeLiteral)
Reference(TypeReference)
Union(Vec<Ty>)
Intersection(Vec<Ty>)
Array(Box<Ty>)
Tuple(TupleType)
Object(ObjectType)
Function(FunctionType)
Constructor(ConstructorType)
Query(TypeQuery)
Operator
IndexedAccess(IndexedAccessType)
Conditional(ConditionalType)
Mapped(MappedType)
Infer(InferType)
Import(ImportType)
TemplateLiteral(TemplateLiteralType)
Parenthesized(Box<Ty>)
This
Predicate(TypePredicate)
Missing(MissingNode)
Trait Implementations§
impl Eq for TypeNode
impl StructuralPartialEq for TypeNode
Auto Trait Implementations§
impl Freeze for TypeNode
impl RefUnwindSafe for TypeNode
impl Send for TypeNode
impl Sync for TypeNode
impl Unpin for TypeNode
impl UnsafeUnpin for TypeNode
impl UnwindSafe for TypeNode
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