Function defaultValue [src]
Loads the field's default value from default_value_ptr.
Returns null if the field has no default value.
Prototype
pub inline fn defaultValue(comptime sf: StructField) ?sf.type
Parameters
sf: StructField
Source
pub inline fn defaultValue(comptime sf: StructField) ?sf.type {
const dp: *const sf.type = @ptrCast(@alignCast(sf.default_value_ptr orelse return null));
return dp.*;
}