Commit d1f9b8184d
Changed files (1)
doc/langref.html.in
@@ -6867,6 +6867,16 @@ fn add(a: i32, b: i32) i32 { return a + b; }
It does not include functions, variables, or constants.
</p>
{#header_close#}
+ {#header_open|@hasField#}
+ <pre>{#syntax#}@hasField(comptime T: type, comptime name: []u8) bool{#endsyntax#}</pre>
+ <p>Returns if the field name of a struct, union, or enum exists.</p>
+ <p>
+ The result is a compile time constant.
+ </p>
+ <p>
+ It does not include functions, variables, constants.
+ </p>
+ {#header_close#}
{#header_open|@memberType#}
<pre>{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}</pre>
<p>Returns the field type of a struct or union.</p>