DoxigAlpha

ptr

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 ptr(self: Self, p: [*]align(@alignOf(Fields)) u8, comptime field: FieldEnum) *Field(field) {
    if (@sizeOf(Field(field)) == 0)
        return undefined;
    const off = self.offset(field);
    return @ptrCast(@alignCast(p + off));
}