Is there a more idiosyncratic way to write an enum with the same argument types but different cases?

前端 未结 0 1785
后悔当初
后悔当初 2020-11-21 08:52

I have an enum such as this:

 enum ValidationMatchingStrategy {
    case contains(pattern: String, error: String? = nil)
    case doesNotContain(pattern: Stri         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题