pub enum TypeKind {
VoidType,
TimeType,
IntType(usize),
EnumType(usize),
PointerType(Type),
SignalType(Type),
VectorType(usize, Type),
StructType(Vec<Type>),
FuncType(Vec<Type>, Type),
EntityType(Vec<Type>, Vec<Type>),
}
The different kinds of types.
Enumerated types like n42
.
Vector types like <4 x i32>
.
Struct types like {i8, i32}
.
Function types like (i32) void
.
Entity types like (i8, i8; i32)
.
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.
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 signal data type, or panic if the type is not an
integer. E.g. yields the i8
type in i8$
.
Check if this type is a void type.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static