Optionals and Error Handling
摘要
Optionals are a way to represent the absence of a value. They are used when a value may not always be available. For example, consider an optional to represent things like a user's current location, which may not be available if the user's location services are turned off, or the name of a device or model, frustratingly also not always available to an application.