enum TypeKind
Kind of a type as seen by comptime reflection (reflect(T).kind, §15.2, D-1906).
Example:
data Point { x: i32; y: i32 }
enum Color { Red, Green }
fn main() io {
print("{reflect(Point).kind == TypeKind.Data} {reflect(Color).kind == TypeKind.Enum}")
}Вывод
true true
pub(api) enum TypeKindС версии. 1.0.0-beta
Варианты
Data | A |
Enum | An |
Union | A union of types. |
Prim | A primitive type. |
Interface | An |
Service | A |
Actor | An |
Topic | A |
Config | A |
Tuple | A tuple. |
Other | Any other type. |
Определено в: std/core/types.oxl:572