OxL Reference

@ @open

@open

Applies to: enum

Section: §4.4

Syntax

ebnf
Attr        = "@" Path [ "(" [ AttrArgs ] ")" ] ;

Grammar: App. A

Defined in

Examples

oxl
pub(api) enum Role { User, Support, Admin }

pub(api) enum Shape {
  Circle(r: f64)
  Rect(w: f64, h: f64)
  Empty
}

@error enum PayError { Declined(reason: str), Fraud, Limit(max: Money) }

@open pub(api) enum Status { New = 1, Paid = 2, Shipped = 3 }

— 4.4 enum

Related diagnostics

deprecated, schema-attr, schema-break, secret-json

See also