-
-
Save cipolleschi/09a01942d0796d53f2c2634192c55b82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ShippingOptions: OptionSet { | |
let rawValue: Int | |
static let nextDay = ShippingOptions(rawValue: 1 << 0) | |
static let secondDay = ShippingOptions(rawValue: 1 << 1) | |
static let priority = ShippingOptions(rawValue: 1 << 2) | |
static let standard = ShippingOptions(rawValue: 1 << 3) | |
static let express: ShippingOptions = [.nextDay, .secondDay] | |
static let all: ShippingOptions = [.express, .priority, .standard] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment