Can I extend an enum with additional values?
An enum can’t be directly extended, but you use the same composition trick one would use with structs (that is, with a struct, one would have a field storing an instance of the ‘parent’). enum Base { Alpha, Beta(usize), } enum Extended { Base(Base), Gamma } If you wish to handle each case individually, this … Read more