I'm trying to write an extension that extends enums based on strings. The way I know to extend all enumerations is to extend RawRepresentable, but I want it restricted to strings-only.
extension RawRepresentable where RawRepresentable.RawValue == String{
func foo(){
let myRawValue:String = self.rawValue
}
}
So how do you specify a 'where' clause to achieve this?