pub enum Type {
Void,
Int,
Float,
Double,
Char,
Pointer(Box<Type>),
Struct(String),
FunctionPointer {
param_types: Vec<Type>,
return_type: Box<Type>,
},
Array {
element_type: Box<Type>,
size: Option<i64>,
},
}Expand description
Represents a C type.
Variants§
Void
void
Int
int
Float
float
Double
double
Char
char
Pointer(Box<Type>)
Pointer to a type
Struct(String)
Struct type (e.g., struct Point)
FunctionPointer
Function pointer type (e.g., int (*callback)(int))
Array
Array type (e.g., int arr[10]) For typedef assertions like: typedef char check[sizeof(int) == 4 ? 1 : -1]
Trait Implementations§
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