A sum type of unit, struct, and newtype variants. An enum of unit variants
is written as the variant name; an enum with another variant as an object
whose tag member names the variant. Kernel@Linear is a unit variant's
value. An exported enum changes as an exported struct does: see the section
"Changing a type that other packages use" of new_struct().
Arguments
- name
The variant's name.
- variants
Named list: The variants,
variant()calls.- description
Character: What the type is.
- tag
Character: The member of an object variant's JSON form that holds the variant's name. A trait's
tagis another member, which holds an implementor's type.- version
Integer: The type's version, from 1.
- storage
Character {"r", "rust"}: Where values hold their fields.
"rust": a Rust-stored type, whose values, unit variants included, the codec in the package's compiled exports builds and holds. Its variant constructors and unit variants signalr8_codec_missing_erroruntil the codec is registered.- object
An enum type object.