pub enum TypeKind {
Integer(IntegerType),
Float(FloatType),
String,
Boolean,
Unit,
Struct(StructType),
Function(FunctionType),
Unknown,
}
Expand description
Represents the different kinds of types in the language
Variants§
Integer(IntegerType)
Integer types (signed/unsigned, different bit widths)
Float(FloatType)
Floating point types
String
String type
Boolean
Boolean type
Unit
Unit type (similar to Rust’s ())
Struct(StructType)
Struct type with fields
Function(FunctionType)
Function type with parameters and return type
Unknown
Unknown or not yet determined type
Implementations§
Source§impl TypeKind
impl TypeKind
Sourcepub fn as_function(&self) -> Option<&FunctionType>
pub fn as_function(&self) -> Option<&FunctionType>
Returns the function type if this is a function, None otherwise
Trait Implementations§
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 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