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 › Capture › wrap Public Function wrap Doc Source Public Function std.zig.Zir.Inst.Capture.wrap
pub fn wrap (cap : Unwrapped ) Capture Params File zig/Zir.zig: 3557
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580 pub fn wrap (cap : Unwrapped ) Capture {
return switch (cap ) {
.nested => |idx | .{
.tag = .nested ,
.data = idx ,
},
.instruction => |inst | .{
.tag = .instruction ,
.data = @intCast (@backingInt (inst )),
},
.instruction_load => |inst | .{
.tag = .instruction_load ,
.data = @intCast (@backingInt (inst )),
},
.decl_val => |str | .{
.tag = .decl_val ,
.data = @intCast (@backingInt (str )),
},
.decl_ref => |str | .{
.tag = .decl_ref ,
.data = @intCast (@backingInt (str )),
},
};
}