From d1f9b8184d61674a77424f026adfef2752d1dfdd Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Mon, 6 May 2019 11:56:51 -0500 Subject: [PATCH] docs for @hasField --- doc/langref.html.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/langref.html.in b/doc/langref.html.in index d11204f619..02375639fb 100644 --- a/doc/langref.html.in +++ b/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.

{#header_close#} + {#header_open|@hasField#} +
{#syntax#}@hasField(comptime T: type, comptime name: []u8) bool{#endsyntax#}
+

Returns if the field name of a struct, union, or enum exists.

+

+ The result is a compile time constant. +

+

+ It does not include functions, variables, constants. +

+ {#header_close#} {#header_open|@memberType#}
{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}

Returns the field type of a struct or union.