pub enum Type {
Ref {
name: String,
pos: Pos,
args: Vec<Type>,
},
Array(Box<Type>),
Record(Vec<Field>),
}Expand description
A type, as it is written in a declaration.
Variants§
Ref
A named type with its arguments, such as Nat or List<Int>.
Fields
Array(Box<Type>)
An array of one element type, such as [Nat].
Record(Vec<Field>)
A record type without a name, such as { x: Int }.
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Forget for Type
impl Freeze for Type
impl Move for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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