Enum moore_svlog::hir::TypeKind[][src]

pub enum TypeKind {
    Implicit,
    Builtin(BuiltinType),
    Named(Spanned<Name>),
    Struct(Vec<NodeId>),
    PackedArray(Box<TypeKind>, NodeIdNodeId),
    Scope(NodeIdSpanned<Name>),
    Enum(Vec<(Spanned<Name>, NodeId)>, Option<NodeId>),
    RefExpr(NodeId),
    RefType(NodeId),
}
Expand description

The different forms a type can take.

Variants

Implicit

An implicit type.

Builtin(BuiltinType)

A builtin type.

Tuple Fields of Builtin

0: BuiltinType
Named(Spanned<Name>)

A named type.

Tuple Fields of Named

0: Spanned<Name>
Struct(Vec<NodeId>)

A struct or union type.

Tuple Fields of Struct

0: Vec<NodeId>
PackedArray(Box<TypeKind>, NodeIdNodeId)

A packed array such as bit [31:0].

Represented as (inner_type, range_lhs, range_rhs).

Tuple Fields of PackedArray

0: Box<TypeKind>1: NodeId2: NodeId
Scope(NodeIdSpanned<Name>)

A scope access such as foo::bar.

Tuple Fields of Scope

0: NodeId1: Spanned<Name>

An enum type.

Each element in the vector refers to a EnumVariant. The optional field indicates the representation type.

Tuple Fields of Enum

0: Vec<(Spanned<Name>, NodeId)>1: Option<NodeId>
RefExpr(NodeId)

A type reference on an expression, such as type(x).

Tuple Fields of RefExpr

0: NodeId
RefType(NodeId)

A type reference on a type, such as type(int).

Tuple Fields of RefType

0: NodeId

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Obtain a human-readable descriptive name for this node.

Obtain a human-readable description for this node, possibly containing the node’s name. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.