Enum llhd::ty::TypeKind [−][src]
pub enum TypeKind {
VoidType,
TimeType,
IntType(usize),
EnumType(usize),
PointerType(Type),
SignalType(Type),
ArrayType(usize, Type),
StructType(Vec<Type>),
FuncType(Vec<Type>, Type),
EntityType(Vec<Type>, Vec<Type>),
}
Expand description
The different kinds of types.
Variants
The void
type.
The time
type.
IntType(usize)
Integer types like i32
.
Tuple Fields of IntType
0: usize
EnumType(usize)
Enumerated types like n42
.
Tuple Fields of EnumType
0: usize
PointerType(Type)
Pointer types like i32*
.
Tuple Fields of PointerType
0: Type
SignalType(Type)
Signal types like i32$
.
Tuple Fields of SignalType
0: Type
Array types like [4 x i32]
.
Struct types like {i8, i32}
.
Function types like (i32) void
.
Entity types like (i8, i8; i32)
.
Implementations
Unwrap the type to its integer bit width, or panic if the type is not an integer.
Unwrap the type to its number of enumerated states, or panic if the type is not an enum.
Unwrap the type to its pointer data type, or panic if the type is not a
pointer. E.g. yields the i8
type in i8*
.
Unwrap the type to its signal data type, or panic if the type is not an
integer. E.g. yields the i8
type in i8$
.
Unwrap the type to its array length and element type, or panic if the
type is not an array. E.g. yields the (16, i32)
in [16 x i32]
.
Unwrap the type to its struct fields, or panic if the type is not a
struct. E.g. yields the [i8, i16]
in {i8, i16}
.
Unwrap the type into arguments and return type, or panic if the type is not a function.
Unwrap the type into input and output arguments, or panic if the type is not an entity.
Check if this is a pointer type.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more