| ... | @@ -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> |