I want to associate two raw values to an enum instance (imagine an enum representing error types, I want
I'm a teapot
No, an enum cannot have multiple raw values - it has to be a single value, implementing the
Equatable protocol, and be literal-convertible as described in the documentation.
I think the best approach in your case is to use the error code as raw value, and a property backed by a prepopulated static dictionary with the error code as key and the text as value.