pub enum Country {
Show 50 variants
AE,
AT,
AU,
BE,
BR,
CA,
CH,
CY,
CZ,
DE,
DK,
EE,
EG,
ES,
FI,
FR,
GB,
GR,
HU,
ID,
IE,
IN,
IT,
JP,
KR,
LT,
LV,
MX,
MY,
NL,
NO,
NZ,
PE,
PH,
PL,
PT,
SA,
SE,
SG,
SK,
TH,
TW,
US,
VN,
HK,
Unknown4Digit,
Unknown5Digit,
Unknown6Digit,
Unknown5DigitSpace,
Unknown5DigitAdditional,
}Expand description
All countries supported by the postcode extractor
Variants§
AE
UAE
AT
Austria
AU
Australia
BE
Belgium
BR
Brazil
CA
Canada
CH
Switzerland
CY
Cyprus
CZ
Czechia
DE
Germany
DK
Denmark
EE
Estonia
EG
Egypt
ES
Spain
FI
Finland
FR
France
GB
UK
GR
Greece
HU
Hungary
ID
Indonesia
IE
Ireland
IN
India
IT
Italy
JP
Japan
KR
Korea, Republic of. (South Korea)
LT
Lithuania
LV
Latvia
MX
Mexico
MY
Malaysia
NL
Netherlands
NO
Norway
NZ
New Zealand
PE
Peru
PH
Philippines
PL
Poland
PT
Portugal
SA
Saudi Arabia
SE
Sweden
SG
Singapore
SK
Slovakia
TH
Thailand
TW
Taiwan
US
USA
VN
Vietnam
HK
Hong Kong
Unknown4Digit
Countries which use four digits in the postcode, e.g. 1234
Unknown5Digit
Countries which use five digits in the postcode, e.g. 12345
Unknown6Digit
Countries which use six digits in the postcode, e.g. 123456
Unknown5DigitSpace
Countries which use five digits in the postcode, but there’s a mandatory space, e.g. 653 02
Unknown5DigitAdditional
Countries with 5 digits and an additional 4 optional e.g. 12345-1234
Implementations§
Source§impl Country
impl Country
Sourcepub fn to_en_name(&self) -> String
pub fn to_en_name(&self) -> String
Convert a country into its English name
Sourcepub fn to_local_name(&self) -> String
pub fn to_local_name(&self) -> String
Convert a country into its best fit local name
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Country
impl<'de> Deserialize<'de> for Country
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Country
impl Ord for Country
Source§impl PartialOrd for Country
impl PartialOrd for Country
impl Copy for Country
impl Eq for Country
impl StructuralPartialEq for Country
Auto Trait Implementations§
impl Freeze for Country
impl RefUnwindSafe for Country
impl Send for Country
impl Sync for Country
impl Unpin for Country
impl UnwindSafe for Country
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)