Skip to content

Commit d1f9b81

Browse files
committed
docs for @Hasfield
1 parent c19bdc2 commit d1f9b81

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/langref.html.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6867,6 +6867,16 @@ fn add(a: i32, b: i32) i32 { return a + b; }
68676867
It does not include functions, variables, or constants.
68686868
</p>
68696869
{#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+
<p>
6877+
It does not include functions, variables, constants.
6878+
</p>
6879+
{#header_close#}
68706880
{#header_open|@memberType#}
68716881
<pre>{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}</pre>
68726882
<p>Returns the field type of a struct or union.</p>

0 commit comments

Comments
 (0)