struct Prefixed [src]
Fields
thread_local: ThreadLocal
prefix: []const u8
Members
- format (Function)
Source
pub const Prefixed = struct {
thread_local: ThreadLocal,
prefix: []const u8,
pub fn format(p: Prefixed, w: *Writer) Writer.Error!void {
switch (p.thread_local) {
.default => return,
.generaldynamic => {
var vecs: [2][]const u8 = .{ p.prefix, "thread_local" };
return w.writeVecAll(&vecs);
},
else => {
var vecs: [4][]const u8 = .{ p.prefix, "thread_local(", @tagName(p.thread_local), ")" };
return w.writeVecAll(&vecs);
},
}
}
}