Function structType [src]
Prototype
pub fn structType( self: *Builder, kind: Type.Structure.Kind, fields: []const Type, ) Allocator.Error!Type
Parameters
self: *Builder
kind: Type.Structure.Kind
fields: []const Type
Source
pub fn structType(
self: *Builder,
kind: Type.Structure.Kind,
fields: []const Type,
) Allocator.Error!Type {
try self.ensureUnusedTypeCapacity(1, Type.Structure, fields.len);
switch (kind) {
inline else => |comptime_kind| return self.structTypeAssumeCapacity(comptime_kind, fields),
}
}