pub fn enum_error(name: &str, variants: &[&str], got: &str) -> ErrorExpand description
Name the enum a value did not belong to, listing what it accepts:
Mode: expected one of "Fast", "Careful", got "fst". got is the offending string
in quotes, or the Lua type name when it was not a string (or, for a data-carrying
enum, not a table). Reported as a FieldError so an enum inside a record extends the
record’s path the way a nested record does.