# std.meta.TrailerFlags: use @Type to improve API · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f94583076ee517be311df6c70654e0cc41bf2b16)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f94583076ee517be311df6c70654e0cc41bf2b16

Requested commit: f94583076ee517be311df6c70654e0cc41bf2b16

Commit: f94583076ee517be311df6c70654e0cc41bf2b16

Tree: 52a4680edbd6882cc9990f373fd2cdf4b9cc0f20

Author: Tadeo Kondrak

Committer: Tadeo Kondrak

## Message

```
std.meta.TrailerFlags: use @Type to improve API

- Use an enum of all field names instead of string literals
- Create a struct type with all fields optional instead of relying on
anonymous struct literals

This should provide better type inference, compile errors, and a
(subjectively) cleaner API.

```

## Parents

- [f6cedfaaca2a1ca22786b32aa76ef6348b74ac38](https://git.cafe/gitcafe/zig/commit/f6cedfaaca2a1ca22786b32aa76ef6348b74ac38?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f94583076ee517be311df6c70654e0cc41bf2b16?format=markdown)
