pub fn fieldNames(comptime T: type) []const [:0]const u8
pub fn fieldNames(comptime T: type) []const [:0]const u8 { return switch (@typeInfo(T)) { .@"struct" => |s| s.field_names, .@"union" => |u| u.field_names, .@"enum" => |e| e.field_names, .error_set => |es| es.error_names.?, else => @compileError("Expected struct, union, error set or enum type, found '" ++ @typeName(T) ++ "'"), }; }