我有一套协议:
protocol SpaceInterpolatorProtocol {
associatedtype Axis: SpaceAxisProtocol
associatedtype Spot: SpaceAxisSpotProtocol
associatedtype Vertex: SpaceVertexProtocol
....
}
protocol SpaceAxisProtocol: Equatable & Hashable {
associatedtype CoordUnit: FloatingPoint
...
}
protocol SpaceVertexProtocol:Hashable {
associatedtype Spot: SpaceAxisSpotProtocol
...
}
protocol SpaceAxisSpotProtocol : Hashable {
associatedtype Axis: SpaceAxisProtocol
...
}
是否可以限制 SpaceInterpolatorProtocol 定义
Axis == Spot.Axis
Axis.CoordUnit == Spot.Axis.CoordUnit
Vertex.Spot == Spot
而不是where
在所有协议扩展中使用?