pub enum Head<'t> {
Builtin(Builtin, Vec<&'t Type>),
Named(DeclId, &'t [Type]),
Tuple(&'t [Type]),
Function {
params: &'t [Type],
result: &'t Type,
},
Param(u32),
NotData,
}Expand description
A Type by its head: a built-in form with its arguments, or one of the
heads a catalog declaration, a tuple, a function, a parameter or a type
that is not data. Every type has exactly one, so a reader of types
matches a head once and names no built-in form it does not mean.
Variants§
Builtin(Builtin, Vec<&'t Type>)
A built-in form, applied to its arguments.
Named(DeclId, &'t [Type])
A declared type, applied to its descriptive arguments.
Tuple(&'t [Type])
A tuple of its parts.
Function
A function.
Param(u32)
The nth type parameter.
NotData
A type with no value encoding.
Trait Implementations§
Auto Trait Implementations§
impl<'t> Forget for Head<'t>
impl<'t> Freeze for Head<'t>
impl<'t> Move for Head<'t>
impl<'t> RefUnwindSafe for Head<'t>
impl<'t> Send for Head<'t>
impl<'t> Sync for Head<'t>
impl<'t> Unpin for Head<'t>
impl<'t> UnsafeUnpin for Head<'t>where
*const u8 is !null: UnsafeUnpin,
PhantomData<&'t Type>: UnsafeUnpin,
&'t [Type]: UnsafeUnpin,
&'t Type: UnsafeUnpin,
impl<'t> UnwindSafe for Head<'t>
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