FromStr
returns a Result<Self, Self::Error>
. Assuming a conversion will always return an enum
, and one of the enum's variant is a defined Invalid value
. What's the proper way to signal that the Result
's E
case can never happen? Using the return type Result<Self, ()>
would, at least to me, signal that there is a possible error, but that it is both unique and obvious.
Is there something along the line of Result<MyEnum, WillNeverHappen>
?