Enum llhd::ty::TypeKind [] [src]

pub enum TypeKind {
    VoidType,
    TimeType,
    IntType(usize),
    EnumType(usize),
    PointerType(Type),
    SignalType(Type),
    VectorType(usizeType),
    StructType(Vec<Type>),
    FuncType(Vec<Type>, Type),
    EntityType(Vec<Type>, Vec<Type>),
}

The different kinds of types.

Variants

The void type.

The time type.

Integer types like i32.

Enumerated types like n42.

Pointer types like i32*.

Signal types like i32$.

Vector types like <4 x i32>.

Struct types like {i8, i32}.

Function types like (i32) void.

Entity types like (i8, i8; i32).

Methods

impl TypeKind
[src]

[src]

Unwrap the type into arguments and return type, or panic if the type is not a function.

[src]

Unwrap the type into input and output arguments, or panic if the type is not an entity.

[src]

Unwrap the type to its integer bit width, or panic if the type is not an integer.

[src]

Unwrap the type to its number of enumerated states, or panic if the type is not an enum.

[src]

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$.

[src]

Check if this type is a void type.

Trait Implementations

impl Debug for TypeKind
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for TypeKind
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for TypeKind
[src]

impl Display for TypeKind
[src]

[src]

Formats the value using the given formatter. Read more