Value of protocol type 'Any' cannot conform to 'Equatable'; only struct/enum/class types can conform to protocols
Value is type "ANY" as it can be Int or String. So not able to implement Equatable protocol.
struct BusinessDetail:Equatable {
static func == (lhs: BusinessDetail, rhs: BusinessDetail) -> Bool {
lhs.cellType == rhs.cellType && lhs.value == rhs.value
}
let cellType: BusinessDetailCellType
var value: Any?
}
enum BusinessDetailCellType:Int {
case x
case y
var textValue:String {
Switch self {
case x:
return "x"
case y:
return "y"
}
}
}