CountryInfo
public struct CountryInfo
extension CountryInfo: 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( countryCode: String, countryName: String ) throws
Parameters
countryCode
ISO 3166-1 alpha-3 code of the country.
countryName
Country name.
-
ISO 3166-1 alpha-3 code of the country.
Guaranteed to be non-empty.
Declaration
Swift
public let countryCode: String
-
Country name.
Guaranteed to be non-empty.
Declaration
Swift
public let countryName: 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