pub enum TypeKind {
Show 22 variants
Int,
Float,
String,
Bool,
Named(String),
Generic(String),
Array(Box<Type>),
Map(Box<Type>, Box<Type>),
Function {
params: Vec<Type>,
return_type: Box<Type>,
},
Tuple(Vec<Type>),
Option(Box<Type>),
Result(Box<Type>, Box<Type>),
Ref(Box<Type>),
MutRef(Box<Type>),
Pointer {
mutable: bool,
pointee: Box<Type>,
},
GenericInstance {
name: String,
type_args: Vec<Type>,
},
Unknown,
Union(Vec<Type>),
Trait(String),
TraitBound(Vec<String>),
Unit,
Infer,
}Variants§
Int
Float
String
Bool
Named(String)
Generic(String)
Array(Box<Type>)
Map(Box<Type>, Box<Type>)
Function
Tuple(Vec<Type>)
Option(Box<Type>)
Result(Box<Type>, Box<Type>)
Ref(Box<Type>)
MutRef(Box<Type>)
Pointer
GenericInstance
Unknown
Union(Vec<Type>)
Trait(String)
TraitBound(Vec<String>)
Unit
Infer
Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.