pub enum TypeKind {
Var(TypeVar),
Con(TypeConst),
App(Type, Type),
Fun(Type, Type),
Tuple(Vec<Type>),
Record(Vec<(Symbol, Type)>),
}Variants§
Var(TypeVar)
Con(TypeConst)
App(Type, Type)
Fun(Type, Type)
Tuple(Vec<Type>)
Record(Vec<(Symbol, Type)>)
Record type {a: T, b: U}.
Invariant: fields are sorted by name. This makes record equality and unification a cheap zip over two vectors, and it makes printing stable.
Trait Implementations§
Source§impl Ord for TypeKind
impl Ord for TypeKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for TypeKind
impl PartialOrd for TypeKind
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnsafeUnpin for TypeKind
impl UnwindSafe for TypeKind
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