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 › Build › Configuration › Step › ConfigHeader › Value › Index Public Enum Index Doc Source Public Enum std.Build.Configuration.Step.ConfigHeader.Value.Index
pub const Index = enum (u32 ) Functions File Build/Configuration.zig: 1132
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162 pub const Index = enum (u32 ) {
int_0 = max_u32 - 5 ,
int_1 = max_u32 - 4 ,
bool_false = max_u32 - 3 ,
bool_true = max_u32 - 2 ,
undef = max_u32 - 1 ,
defined = max_u32 ,
_ ,
pub fn unpack (this : @This (), c : *const Configuration ) Unpacked {
return switch (this ) {
.int_0 => .{ .u64 = 0 },
.int_1 => .{ .u64 = 1 },
.bool_false => .{ .bool = false },
.bool_true => .{ .bool = true },
.undef => .undef ,
.defined => .defined ,
_ => {
const value = extraData (c , Value , @backingInt (this ));
return switch (value .flags .tag ) {
.ident => .{ .ident = value .ident .value .?.slice (c ) },
.string => .{ .string = value .string .value .?.slice (c ) },
.small_unsigned => .{ .u64 = value .flags .small },
.small_signed => .{ .i64 = @as (i29 , @bitCast (value .flags .small )) },
.i64 => .{ .i64 = value .i64 .value .? },
.u64 => .{ .u64 = value .u64 .value .? },
};
},
};
}
}