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

Union

Public Struct
std.lang.Type.Union
pub const Union = struct

This data structure is used by the Zig language code generation and therefore must be kept in sync with the compiler implementation.

Fields

layout: ContainerLayout
tag_type: ?type
backing_integer: ?type

Always null if layout != .@"packed".

field_names: []const [:0]const u8
field_types: []const type

Guaranteed to have the same length as field_names.

field_attrs: []const FieldAttributes

Guaranteed to have the same length as field_names.

decl_names: []const [:0]const u8

Structs

File

lang.zig:825
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
    pub const Union = struct {
        layout: ContainerLayout,
        tag_type: ?type,
        /// Always `null` if `layout != .@"packed"`.
        backing_integer: ?type,

        field_names: []const [:0]const u8,
        /// Guaranteed to have the same length as `field_names`.
        field_types: []const type,
        /// Guaranteed to have the same length as `field_names`.
        field_attrs: []const FieldAttributes,

        decl_names: []const [:0]const u8,

        pub const FieldAttributes = struct {
            /// `null` means the field alignment is not explicitly specified. The field will still
            /// be aligned to at least `@alignOf` the field type.
            @"align": ?usize = null,
        };
    }