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 Typewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Type>: Freeze,
*const Type is !null: Freeze,
PhantomData<Field>: Freeze,
impl Move for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Typewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Type>: UnsafeUnpin,
*const Type is !null: UnsafeUnpin,
PhantomData<Field>: UnsafeUnpin,
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