Can you please describe what the specific task are you trying to solve?
I suppose what you need will generally become possible in future, when Enums will have generated Discriminator. This was discussed several times, here are some links: Comparing enum cases while ignoring associated values - #8 by Dmitriy_Ignatyev
Discriminator is a generated plain enum with the same cases. So, with result instance you can do something like result.discriminator == .success
no matter what the generic Success & Failure types are.