setMany
fields is a struct with each field set to an optional value
Function parameters
Parameters
- p:[*]align(@alignOf(Fields)) u8
This is useful for saving memory when allocating an object that has many
Functions
- TrailerFlags
- This is useful for saving memory when allocating an object that has many
Source
Implementation
pub fn setMany(self: Self, p: [*]align(@alignOf(Fields)) u8, fields: FieldValues) void {
inline for (@typeInfo(Fields).@"struct".fields, 0..) |field, i| {
if (@field(fields, field.name)) |value|
self.set(p, @as(FieldEnum, @enumFromInt(i)), value);
}
}