Is there some kind of way to allow you to extend or shorten an enum?
For example, I have an enum:
enum Planets {
Mercury(f64, f64),
Venus(f64, f64),
Earth(f64, f64),
//...
Neptune(f64, f64)
}```
Let's say this enum is in a lib, and I would like to allow whoever is using the lib to extend the enum on their end without modifying the source code;
Is there some kind of crate for that? Alternatively a macro?
Something to allow you something like this;
```rust
struct Pluto(f64, f64);
extend_enum!(Planets, Pluto);
fn select_planet(planet: Planets) -> Planets {
match planets_enum {
Planets::Mercury(x, y) => {},
Planets::Venus(x, y) => {},
//...
Planets::Pluto(x, y) => {},
}```
