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 › llvm › Builder › Type › changeLengthAssumeCapacity Public Function changeLengthAssumeCapacity Doc Source Public Function std.zig.llvm.Builder.Type.changeLengthAssumeCapacity
pub fn changeLengthAssumeCapacity (self : Type , len : u32 , builder : *Builder ) Type Params File zig/llvm/Builder.zig: 1334
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358 pub fn changeLengthAssumeCapacity (self : Type , len : u32 , builder : *Builder ) Type {
const item = builder .type_items .items [@backingInt (self )];
return switch (item .tag ) {
inline .vector ,
.scalable_vector ,
=> |kind | builder .vectorTypeAssumeCapacity (
switch (kind ) {
.vector => .normal ,
.scalable_vector => .scalable ,
else => unreachable ,
},
len ,
builder .typeExtraData (Type .Vector , item .data ).child ,
),
.small_array => builder .arrayTypeAssumeCapacity (
len ,
builder .typeExtraData (Type .Vector , item .data ).child ,
),
.array => builder .arrayTypeAssumeCapacity (
len ,
builder .typeExtraData (Type .Array , item .data ).child ,
),
else => unreachable ,
};
}