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 › TargetQuery › OsVersion Public Union OsVersion Doc Source Public Union std.Build.Configuration.TargetQuery.OsVersion
pub const OsVersion = union (@This ().Tag ) Fields Types Functions File Build/Configuration.zig: 2230
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246 pub const OsVersion = union (@This ().Tag ) {
pub const Tag = enum (u2 ) { none , semver , windows , default };
none : void ,
semver : String ,
windows : std .Target .Os .WindowsVersion ,
default : void ,
pub fn unwrap (this : @This (), c : *const Configuration ) ?std .Target .Query .OsVersion {
return switch (this ) {
.none => .none ,
.semver => |sv | .{ .semver = std .SemanticVersion .parse (sv .slice (c )) catch unreachable },
.windows => |wv | .{ .windows = wv },
.default => null ,
};
}
}