Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › llvm › Builder › AtomicOrdering Public Enum AtomicOrdering Doc Source Public Enum std.zig.llvm.Builder.AtomicOrdering
pub const AtomicOrdering = enum (u3 ) Structs Functions File zig/llvm/Builder.zig: 8280
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311 pub const AtomicOrdering = enum (u3 ) {
none = 0 ,
unordered = 1 ,
monotonic = 2 ,
acquire = 3 ,
release = 4 ,
acq_rel = 5 ,
seq_cst = 6 ,
pub fn format (atomic_ordering : AtomicOrdering , w : *Writer ) Writer .Error !void {
return Prefixed .format (.{ .atomic_ordering = atomic_ordering , .prefix = "" }, w );
}
pub const Prefixed = struct {
atomic_ordering : AtomicOrdering ,
prefix : []const u8 ,
pub fn format (p : Prefixed , w : *Writer ) Writer .Error !void {
switch (p .atomic_ordering ) {
.none => return ,
else => {
var vecs : [2 ][]const u8 = .{ p .prefix , @tagName (p .atomic_ordering ) };
return w .writeVecAll (&vecs );
},
}
}
};
pub fn fmt (atomic_ordering : AtomicOrdering , prefix : []const u8 ) Prefixed {
return .{ .atomic_ordering = atomic_ordering , .prefix = prefix };
}
}