Country
public struct Country
extension Country: Equatable
Country information.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance with the specified country code and country name.
Throws
If a code or name is empty, the
InitializationError
error thrown.Declaration
Swift
public init( code: String, name: String ) throws
Parameters
code
ISO 3166-1 alpha-3 code of the country.
name
Country name.
-
ISO 3166-1 alpha-3 code of the country.
Guaranteed to be non-empty.
Declaration
Swift
public let code: String
-
Country name.
Guaranteed to be non-empty.
Declaration
Swift
public let name: String
-
An error that occurs during the creation of the instance.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum InitializationError : Error