I keep getting tripped up by this: if I implement something in a module with an enum, with methods etc., there doesn’t seem to be a way to allow consumers of the module to use the impls defined for the enum without just making the whole thing public. But I may wish to preserve invariants by only allowing values to be created or manipulated by my own functions, and there doesn’t seem to be a way to do that. (I’m thinking of an analogy to exporting the type but not the data constructors in Haskell.)
There does seem to be a workaround, defining a public newtype struct with a private member containing the enum. But that seems kind of a pain, especially if you want to define the impls on both.