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 Type Function

FlagUnion

Public Type Function
std.Build.Configuration.Storage.FlagUnion
pub fn FlagUnion(
        comptime flags_arg: @EnumLiteral(),
        comptime flag_arg: @EnumLiteral(),
        comptime UnionArg: type,
    ) type

The type of the field is determined by an enum within a packed struct.

Fields

Values

File

Build/Configuration.zig:2560
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
    pub fn FlagUnion(
        comptime flags_arg: @EnumLiteral(),
        comptime flag_arg: @EnumLiteral(),
        comptime UnionArg: type,
    ) type {
        return struct {
            u: Union,

            pub const storage: Storage = .flag_union;
            pub const flags = flags_arg;
            pub const flag = flag_arg;
            pub const Union = UnionArg;

            pub const Tag = @typeInfo(Union).@"union".tag_type.?;
        };
    }