This came up while I was playing around with parsing, that I wanted to have something that is roughly equivalent to the statement “FooBar or nothing”. Where FooBar could be a string or an i32 or something.
For my case I made a one element enumeration and then option-ed it because I wanted the option semantics but that felt clunky. And if I wanted it to be a specific value say a string this would be even weirder because I would then have to write a
Is this something that others have wanted to do in the past or does it smell bad?