authorgravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2019-05-06 11:56:51-05:00
committergravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2019-05-06 11:58:04-05:00
logd1f9b8184d61674a77424f026adfef2752d1dfdd
tree19cf528d85fa794a2b2c95be73ff3493ea48855b
parentc19bdc2d370f3a72ef492e2f4e6264e2a0dd91ec

docs for @hasField


1 files changed, 10 insertions(+), 0 deletions(-)

doc/langref.html.in+10
...@@ -6867,6 +6867,16 @@ fn add(a: i32, b: i32) i32 { return a + b; }...@@ -6867,6 +6867,16 @@ fn add(a: i32, b: i32) i32 { return a + b; }
6867 It does not include functions, variables, or constants.6867 It does not include functions, variables, or constants.
6868 </p>6868 </p>
6869 {#header_close#}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 <p>
6877 It does not include functions, variables, constants.
6878 </p>
6879 {#header_close#}
6870 {#header_open|@memberType#}6880 {#header_open|@memberType#}
6871 <pre>{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}</pre>6881 <pre>{#syntax#}@memberType(comptime T: type, comptime index: usize) type{#endsyntax#}</pre>
6872 <p>Returns the field type of a struct or union.</p>6882 <p>Returns the field type of a struct or union.</p>