OxL Reference

enum TypeKind

Kind of a type as seen by comptime reflection (reflect(T).kind, §15.2, D-1906).

Example:

oxl✓ checked in CI
data Point { x: i32; y: i32 }
enum Color { Red, Green }

fn main() io {
  print("{reflect(Point).kind == TypeKind.Data} {reflect(Color).kind == TypeKind.Enum}")
}
Output
true true
pub(api) enum TypeKind

Since. 1.0.0-beta

Variants

Data

A data type.

Enum

An enum.

Union

A union of types.

Prim

A primitive type.

Interface

An interface.

Service

A service.

Actor

An actor.

Topic

A topic.

Config

A config or dynamic declaration.

Tuple

A tuple.

Other

Any other type.

Defined in: std/core/types.oxl:572

See also