I have the following enum:
enum Message: ErrorType {
case MessageWithInfo(info:String?)
case MessageDidFail
case MessageDidSend(info:String)
case InvalidMessageData
case MessageWithDelay(delay:Double)
.... will keep adding more
}
I am trying to figure out how to write the Equatable function that would let me then compare Message enums.
I found some similar questions on stack overflow, but I couldn't find one that would allow me to compare without having to switch on every single case.
Is there a way to write the equatable function once and have it work even if I keep adding more cases to this enum?