. -, ObjectIdentifier
. () :
protocol NetworkSubscriber : class, Equatable {
func onMessage(_ packet: NetworkPacket)
}
(, i
. Swift.)
. ( Self
Equatable
). , , , .
func ==<T: NetworkSubscriber>(lhs: T, rhs: T) -> Bool {
return ObjectIdentifier(lhs) == ObjectIdentifier(rhs)
}
, NetworkSubscriber
, , . , . , .