pub enum InstanceTypeKind {
Callable(CallableShapeId),
Function(FunctionShapeId),
Intersection(Vec<TypeId>),
Union(Vec<TypeId>),
Readonly(TypeId),
TypeParameter {
constraint: Option<TypeId>,
},
SymbolRef(SymbolRef),
NeedsEvaluation,
NotConstructor,
}Expand description
Classification for extracting instance types from constructor types.
Variants§
Callable(CallableShapeId)
Callable type - extract from construct_signatures return types
Function(FunctionShapeId)
Function type - check is_constructor flag
Intersection(Vec<TypeId>)
Intersection type - recursively extract instance types from members
Union(Vec<TypeId>)
Union type - recursively extract instance types from members
Readonly(TypeId)
ReadonlyType - unwrap and recurse
TypeParameter
Type parameter with constraint - follow constraint
SymbolRef(SymbolRef)
Symbol reference (Ref or TypeQuery) - needs resolution to class instance type
NeedsEvaluation
Complex types (Conditional, Mapped, IndexAccess, KeyOf) - need evaluation
NotConstructor
Not a constructor type
Trait Implementations§
Source§impl Clone for InstanceTypeKind
impl Clone for InstanceTypeKind
Source§fn clone(&self) -> InstanceTypeKind
fn clone(&self) -> InstanceTypeKind
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 moreAuto Trait Implementations§
impl Freeze for InstanceTypeKind
impl RefUnwindSafe for InstanceTypeKind
impl Send for InstanceTypeKind
impl Sync for InstanceTypeKind
impl Unpin for InstanceTypeKind
impl UnsafeUnpin for InstanceTypeKind
impl UnwindSafe for InstanceTypeKind
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