pub enum ConstructorTypeKind {
Callable,
Function(FunctionShapeId),
Members(Vec<TypeId>),
Inner(TypeId),
Constraint(Option<TypeId>),
NeedsTypeEvaluation,
NeedsApplicationEvaluation,
TypeQuery(SymbolRef),
NotConstructor,
}Expand description
Result of classifying a type for constructor collection.
This enum tells the caller what kind of type this is and how to proceed when collecting constructor types from a composite type structure.
Variants§
Callable
This is a Callable type - always a constructor type
Function(FunctionShapeId)
This is a Function type - check is_constructor flag on the shape
Members(Vec<TypeId>)
Recurse into these member types (Union, Intersection)
Inner(TypeId)
Recurse into the inner type (ReadonlyType)
Constraint(Option<TypeId>)
Recurse into the constraint (TypeParameter, Infer)
NeedsTypeEvaluation
This type needs full type evaluation (Conditional, Mapped, IndexAccess, KeyOf)
NeedsApplicationEvaluation
This is a generic application that needs instantiation
TypeQuery(SymbolRef)
This is a TypeQuery - resolve the symbol reference to get its type
NotConstructor
This type cannot be a constructor (primitives, literals, etc.)
Trait Implementations§
Source§impl Clone for ConstructorTypeKind
impl Clone for ConstructorTypeKind
Source§fn clone(&self) -> ConstructorTypeKind
fn clone(&self) -> ConstructorTypeKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstructorTypeKind
impl Debug for ConstructorTypeKind
Source§impl PartialEq for ConstructorTypeKind
impl PartialEq for ConstructorTypeKind
impl Eq for ConstructorTypeKind
impl StructuralPartialEq for ConstructorTypeKind
Auto Trait Implementations§
impl Freeze for ConstructorTypeKind
impl RefUnwindSafe for ConstructorTypeKind
impl Send for ConstructorTypeKind
impl Sync for ConstructorTypeKind
impl Unpin for ConstructorTypeKind
impl UnsafeUnpin for ConstructorTypeKind
impl UnwindSafe for ConstructorTypeKind
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§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.