default = 0generaldynamic = 1localdynamic = 2initialexec = 3localexec = 4pub fn format( self: ThreadLocal, comptime prefix: []const u8, _: std.fmt.FormatOptions, writer: anytype, ) @TypeOf(writer).Error!voidpub fn format(
self: ThreadLocal,
comptime prefix: []const u8,
_: std.fmt.FormatOptions,
writer: anytype,
) @TypeOf(writer).Error!void {
if (self == .default) return;
try writer.print("{s}thread_local", .{prefix});
if (self != .generaldynamic) try writer.print("({s})", .{@tagName(self)});
}pub const ThreadLocal = enum(u3) {
default = 0,
generaldynamic = 1,
localdynamic = 2,
initialexec = 3,
localexec = 4,
pub fn format(
self: ThreadLocal,
comptime prefix: []const u8,
_: std.fmt.FormatOptions,
writer: anytype,
) @TypeOf(writer).Error!void {
if (self == .default) return;
try writer.print("{s}thread_local", .{prefix});
if (self != .generaldynamic) try writer.print("({s})", .{@tagName(self)});
}
}