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

FlagOptional

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

The presence of the field is determined by a boolean within a packed struct.

Fields

value: ?Value

Values

File

Build/Configuration.zig:2544
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
    pub fn FlagOptional(
        comptime flags_arg: @EnumLiteral(),
        comptime flag_arg: @EnumLiteral(),
        comptime ValueArg: type,
    ) type {
        return struct {
            value: ?Value,

            pub const storage: Storage = .flag_optional;
            pub const flags = flags_arg;
            pub const flag = flag_arg;
            pub const Value = ValueArg;
        };
    }