pub enum Type {
Show 17 variants
Int,
Float,
String,
Bool,
Unit,
Never,
Tuple(Vec<Type>),
NamedStruct(NamedStructType),
AnonymousStruct(AnonymousStructType),
Enum(EnumType),
Function(Signature),
Iterable(Box<Type>),
Optional(Box<Type>),
Generic(ParameterizedTypeBlueprint, Vec<Type>),
Blueprint(ParameterizedTypeBlueprint),
Variable(String),
External(ExternalType),
}
Variants§
Int
Float
String
Bool
Unit
Never
Tuple(Vec<Type>)
NamedStruct(NamedStructType)
AnonymousStruct(AnonymousStructType)
Enum(EnumType)
Function(Signature)
Iterable(Box<Type>)
Optional(Box<Type>)
Generic(ParameterizedTypeBlueprint, Vec<Type>)
Blueprint(ParameterizedTypeBlueprint)
Variable(String)
External(ExternalType)
Implementations§
Source§impl Type
impl Type
pub fn assignable_type(&self, other: &Self) -> bool
pub fn compatible_with(&self, other: &Self) -> bool
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