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 Constant

FieldValues

Public Constant
std.meta.trailer_flags.TrailerFlags.FieldValues
pub const FieldValues = blk:

File

meta/trailer_flags.zig:22
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
        pub const FieldValues = blk: {
            var field_names: [bit_count][]const u8 = undefined;
            var field_types: [bit_count]type = undefined;
            var field_attrs: [bit_count]std.builtin.Type.Struct.FieldAttributes = undefined;
            const fields_info = @typeInfo(Fields).@"struct";
            for (
                fields_info.field_names,
                fields_info.field_types,
                &field_names,
                &field_types,
                &field_attrs,
            ) |field_name, field_type, *new_name, *NewType, *new_attrs| {
                new_name.* = field_name;
                NewType.* = ?field_type;
                const default: ?field_type = null;
                new_attrs.* = .{ .default_value_ptr = &default };
            }
            break :blk @Struct(.auto, null, &field_names, &field_types, &field_attrs);
        }