We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c19bdc2 commit d1f9b81Copy full SHA for d1f9b81
doc/langref.html.in
@@ -6867,6 +6867,16 @@ fn add(a: i32, b: i32) i32 { return a + b; }
6867
It does not include functions, variables, or constants.
6868
</p>
6869
{#header_close#}
6870
+ {#header_open|@hasField#}
6871
+ <pre>{#syntax#}@hasField(comptime T: type, comptime name: []u8) bool{#endsyntax#}</pre>
6872
+ <p>Returns if the field name of a struct, union, or enum exists.</p>
6873
+ <p>
6874
+ The result is a compile time constant.
6875
+ </p>
6876
6877
+ It does not include functions, variables, constants.
6878
6879
+ {#header_close#}
6880
{#header_open|@memberType#}
6881
<pre>{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}</pre>
6882
<p>Returns the field type of a struct or union.</p>
0 commit comments