pub enum Ty {
Show 22 variants
Unit,
U8,
U16,
U32,
U64,
I8,
I16,
I32,
I64,
F32,
F64,
String,
Bool,
Pointer(Box<Ty>),
Option(Box<Ty>),
Array {
item: Box<Ty>,
len: usize,
},
Slice(Box<Ty>),
Tuple(Vec<Ty>),
RefRo(Box<Ty>),
RefMut(Box<Ty>),
Struct {
name: String,
args: Vec<Ty>,
},
Enum {
name: String,
args: Vec<Ty>,
},
}Expand description
Semantic type assigned by checking and consumed by lower IRs/backends.
Variants§
Unit
The unit type.
U8
Unsigned 8-bit integer type.
U16
Unsigned 16-bit integer type.
U32
Unsigned 32-bit integer type.
U64
Unsigned 64-bit integer type.
I8
Signed 8-bit integer type.
I16
Signed 16-bit integer type.
I32
Signed 32-bit integer type.
I64
Signed 64-bit integer type.
F32
32-bit floating-point type.
F64
64-bit floating-point type.
String
The string value type.
Bool
The boolean type.
Pointer(Box<Ty>)
Nullable owned pointer to another type.
Option(Box<Ty>)
Optional value.
Array
Fixed-size array of items.
Slice(Box<Ty>)
Borrowed slice of items.
Tuple(Vec<Ty>)
Tuple of positional elements.
RefRo(Box<Ty>)
Read-only reference to another type.
RefMut(Box<Ty>)
Mutable reference to another type.
Struct
Struct type with optional concrete type arguments.
Fields
Enum
Enum type with optional concrete type arguments.
Implementations§
Trait Implementations§
Source§impl Ord for Ty
impl Ord for Ty
Source§impl PartialOrd for Ty
impl PartialOrd for Ty
impl Eq for Ty
impl StructuralPartialEq for Ty
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnwindSafe for Ty
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