Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Enum

OsTag

Public Enum
std.Build.Configuration.TargetQuery.OsTag
pub const OsTag = enum(u6)

Functions

pub fn init(x: ?std.Target.Os.Tag) @This()
pub fn unwrap(this: @This()) ?std.Target.Os.Tag

File

Build/Configuration.zig:2375
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
    pub const OsTag = enum(u6) {
        freestanding,
        other,
        contiki,
        fuchsia,
        hermit,
        managarm,
        haiku,
        hurd,
        illumos,
        linux,
        plan9,
        rtems,
        serenity,
        dragonfly,
        freebsd,
        netbsd,
        openbsd,
        driverkit,
        ios,
        maccatalyst,
        macos,
        tvos,
        visionos,
        watchos,
        windows,
        uefi,
        @"3ds",
        wiiu,
        @"switch",
        gba,
        psx,
        ps3,
        ps4,
        ps5,
        psp,
        vita,
        emscripten,
        wasi,
        amdhsa,
        amdpal,
        cuda,
        mesa3d,
        nvcl,
        opencl,
        opengl,
        vulkan,
        tios,
        ashetos,

        default,

        pub fn init(x: ?std.Target.Os.Tag) @This() {
            return switch (x orelse return .default) {
                inline else => |tag| @field(@This(), @tagName(tag)),
            };
        }

        pub fn unwrap(this: @This()) ?std.Target.Os.Tag {
            return switch (this) {
                inline else => |tag| @field(std.Target.Os.Tag, @tagName(tag)),
                .default => null,
            };
        }
    }