Swift-Struktur nicht entsprechen zu Protokoll Gleichsetzbar?

Wie mache ich eine Struktur entsprechen-Protokoll "Gleichsetzbar"?

Ich bin mit Xcode 7.3.1

struct MyStruct {
   var id: Int
   var value: String

   init(id: Int, value: String) {
       self.id = id
       self.value = value
   }

   var description: String {
       return "blablabla"
   }

}

Wenn ich "MyStruct", Xcode zeigt die Fehlermeldung:

MyStruct nicht entsprechen zu Protokoll "Gleichsetzbar"

Haben Sie eine Idee, um MyStruct entsprechen-Protokoll?

InformationsquelleAutor Insou | 2016-05-31
Schreibe einen Kommentar