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 › Linkage Public Enum Linkage Doc Source Public Enum std.zig.llvm.Builder.Linkage
pub const Linkage = enum (u4 ) Functions File zig/llvm/Builder.zig: 2724
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747 pub const Linkage = enum (u4 ) {
private = 9 ,
internal = 3 ,
weak = 1 ,
weak_odr = 10 ,
linkonce = 4 ,
linkonce_odr = 11 ,
available_externally = 12 ,
appending = 2 ,
common = 8 ,
extern_weak = 7 ,
external = 0 ,
pub fn format (self : Linkage , w : *Writer ) Writer .Error !void {
if (self != .external ) try w .print (" {s}" , .{@tagName (self )});
}
fn formatOptional (data : ?Linkage , w : *Writer ) Writer .Error !void {
if (data ) |linkage | try w .print (" {s}" , .{@tagName (linkage )});
}
pub fn fmtOptional (self : ?Linkage ) std .fmt .Alt (?Linkage , formatOptional ) {
return .{ .data = self };
}
}