pub enum ConstraintTypeKind {
TypeParameter {
constraint: Option<TypeId>,
default: Option<TypeId>,
},
Union(Vec<TypeId>),
Intersection(Vec<TypeId>),
SymbolRef(SymbolRef),
Application {
app_id: u32,
},
Mapped {
mapped_id: u32,
},
KeyOf(TypeId),
Resolved(TypeId),
NoConstraint,
}Expand description
Classification for constraint types.
Variants§
TypeParameter
Type parameter or infer with constraint
Union(Vec<TypeId>)
Union - get constraint from each member
Intersection(Vec<TypeId>)
Intersection - get constraint from each member
SymbolRef(SymbolRef)
Symbol reference - resolve first
Application
Application - evaluate first
Mapped
Mapped type - evaluate constraint
KeyOf(TypeId)
KeyOf - special handling
Resolved(TypeId)
Literal or resolved constraint
NoConstraint
No constraint
Trait Implementations§
Source§impl Clone for ConstraintTypeKind
impl Clone for ConstraintTypeKind
Source§fn clone(&self) -> ConstraintTypeKind
fn clone(&self) -> ConstraintTypeKind
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 ConstraintTypeKind
impl RefUnwindSafe for ConstraintTypeKind
impl Send for ConstraintTypeKind
impl Sync for ConstraintTypeKind
impl Unpin for ConstraintTypeKind
impl UnsafeUnpin for ConstraintTypeKind
impl UnwindSafe for ConstraintTypeKind
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