@ @since
@since(n)
Applies to: type, field
Section: §9.2
Syntax
Attr = "@" Path [ "(" [ AttrArgs ] ")" ] ;Grammar: App. A
Defined in
- 9.2 Field numbers and schema — Every field of a data and every variant of an enum has a stable tag (the number in the wire format).
- 4.2 data — A field: visibility?
- 4.9 Attributes — Syntax: @name or @name(arguments) before a declaration, field, parameter or rpc.
Examples
pub(api) data User {
pub(api) id: UserId
pub(api) name: Name
pub(api) email: Email? @since(2)
role: Role = Role.User
createdAt: Time = now()
invariant name != "admin" || role == Role.Admin
}— 4.2 data
Related diagnostics
schema-attr, schema-break, unknown-field, deprecated