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 Struct

EnumDecl

Public Struct
std.zig.Zir.Inst.EnumDecl
pub const EnumDecl = struct

Trailing:

  1. captures_len: u32, // if has_captures_len
  2. decls_len: u32, // if has_decls_len
  3. fields_len: u32, // if has_fields_len
  4. tag_type_body_len: u32, // if has_tag_type
  5. capture: Capture // for every captures_len
  6. capture_name: NullTerminatedString // for every captures_len
  7. decl: Index, // for every decls_len; points to a declaration instruction
  8. field_name: NullTerminatedString // for every fields_len
  9. field_value_body_len: u32 // for every fields_len if any_field_values
  10. tag_type_body_inst: Inst.Index // for each tag_type_body_len
  11. body_inst: Inst.Index // value body for each field

Fields

fields_hash_0: u32

These fields should be concatenated and reinterpreted as a std.zig.SrcHash. This hash contains the source of all fields, and the backing type if specified.

fields_hash_1: u32
fields_hash_2: u32
fields_hash_3: u32
src_line: u32
src_column: u32
src_node: Ast.Node.Index

This node provides a new absolute baseline node for all instructions within this struct.

Structs

File

zig/Zir.zig:3664
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
    pub const EnumDecl = struct {
        // These fields should be concatenated and reinterpreted as a `std.zig.SrcHash`.
        // This hash contains the source of all fields, and the backing type if specified.
        fields_hash_0: u32,
        fields_hash_1: u32,
        fields_hash_2: u32,
        fields_hash_3: u32,
        src_line: u32,
        src_column: u32,
        /// This node provides a new absolute baseline node for all instructions within this struct.
        src_node: Ast.Node.Index,

        pub const Small = packed struct(u16) {
            has_captures_len: bool,
            has_decls_len: bool,
            has_fields_len: bool,
            name_strategy: NameStrategy,
            has_tag_type: bool,
            nonexhaustive: bool,
            any_field_values: bool,
            _: u8 = 0,
        };
    }