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 Function

typeDecls

Public Function
std.zig.Zir.typeDecls
pub fn typeDecls(zir: Zir, type_decl: Inst.Index) []const Zir.Inst.Index

Params

File

zig/Zir.zig:5256
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
pub fn typeDecls(zir: Zir, type_decl: Inst.Index) []const Zir.Inst.Index {
    const inst = zir.instructions.get(@backingInt(type_decl));
    assert(inst.tag == .extended);
    return switch (inst.data.extended.opcode) {
        .struct_decl => zir.getStructDecl(type_decl).decls,
        .union_decl => zir.getUnionDecl(type_decl).decls,
        .enum_decl => zir.getEnumDecl(type_decl).decls,
        .opaque_decl => zir.getOpaqueDecl(type_decl).decls,
        else => unreachable,
    };
}