@offsetOf

@offsetOf

@offsetOf(comptime T: type, comptime field_name: []const u8) comptime_int

Returns the byte offset of a field relative to its containing struct.

See also:

  • @bitOffsetOf