Zig 0.17.0-dev (Split by item) 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.
std › zig › Zir › Inst › UnionDecl › Kind Public Enum Kind Doc Source Public Enum std.zig.Zir.Inst.UnionDecl.Kind
pub const Kind = enum (u3 ) Functions File zig/Zir.zig: 3725
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755 pub const Kind = enum (u3 ) {
/// `union`
auto ,
/// `union(T)`
tagged_explicit ,
/// `union(enum)`
tagged_enum ,
/// `union(enum(T))`
tagged_enum_explicit ,
/// `extern union`
@"extern" ,
/// `packed union`
@"packed" ,
/// `packed union(T)`
packed_explicit ,
pub fn hasArgType (k : Kind ) bool {
return switch (k ) {
.auto , .tagged_enum , .@"extern" , .@"packed" => false ,
.tagged_explicit , .tagged_enum_explicit , .packed_explicit => true ,
};
}
pub fn layout (k : Kind ) std .lang .Type .ContainerLayout {
return switch (k ) {
.auto , .tagged_explicit , .tagged_enum , .tagged_enum_explicit => .auto ,
.@"extern" => .@"extern" ,
.@"packed" , .packed_explicit => .@"packed" ,
};
}
}