pub enum Type {
Unknown,
Unit,
Var(Id),
Name(String),
Int64,
Array(TypeCell, isize),
Function {
is_pure: bool,
args: Vec<Type>,
ret: Box<Type>,
},
}
Variants§
Unknown
Unit
Var(Id)
Name(String)
Int64
Array(TypeCell, isize)
A negative size indicates that the size is not yet known.
Function
Implementations§
Source§impl Type
impl Type
pub fn unwrap(self) -> Self
pub fn is_known(self) -> bool
pub fn make_unknown() -> TypeCell
pub fn int64_singleton() -> TypeCell
pub fn unit_singleton() -> TypeCell
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
The number of bytes to store one instance of a value of the current type.
pub fn as_array_type(&self) -> (TypeCell, isize)
pub fn mangle(&self) -> String
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin 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