I wonder if this pitch should change so it could be used in SwiftUI?
This small change would allow it to work both like in the pitch or like in SwiftUI.
// Similar to Edge.Set
enum ShippingOptions: Int {
case nextDay, secondDay, priority, standard
@OptionSet<ShippingOptions>
struct Set { }
}
// Similar to example in pitch
@OptionSet<ShippingOptions.Options>
struct ShippingOptions {
private enum Options: Int {
case nextDay, secondDay, priority, standard
}
}
EDIT: Updated to work with enum on outside or inside.