How to Use OptionSet in Swift with code samples

Discover how to use Swift’s OptionSet to represent multiple Boolean options, and see a side‑by‑side comparison with an enum‑based approach — complete with code samples.