1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
//! ISO 3166-1 country codes, as the two-character FIX `Country` datatype.
use crate::{basic_types::FixStr, fix_str};
/// A country or territory identified by an ISO 3166-1 alpha-2 code.
///
/// The default is [`Unspecified`](Self::Unspecified), with empty text views
/// and zero-filled byte views. FIX serialization rejects it; Serde represents
/// it as an empty string in both directions.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "serde-deserialize", derive(serde::Deserialize))]
pub enum Country {
/// No country has been specified.
#[default]
#[cfg_attr(
any(feature = "serde-serialize", feature = "serde-deserialize"),
serde(rename = "")
)]
Unspecified,
/// Andorra
AD,
/// United Arab Emirates
AE,
/// Afghanistan
AF,
/// Antigua and Barbuda
AG,
/// Anguilla
AI,
/// Albania
AL,
/// Armenia
AM,
/// Angola
AO,
/// Antarctica
AQ,
/// Argentina
AR,
/// American Samoa
AS,
/// Austria
AT,
/// Australia
AU,
/// Aruba
AW,
/// Aland Islands
AX,
/// Azerbaijan
AZ,
/// Bosnia and Herzegovina
BA,
/// Barbados
BB,
/// Bangladesh
BD,
/// Belgium
BE,
/// Burkina Faso
BF,
/// Bulgaria
BG,
/// Bahrain
BH,
/// Burundi
BI,
/// Benin
BJ,
/// Saint Barthelemy
BL,
/// Bermuda
BM,
/// Brunei Darussalam
BN,
/// Bolivia (Plurinational State of)
BO,
/// Bonaire, Sint Eustatius and Saba
BQ,
/// Brazil
BR,
/// Bahamas
BS,
/// Bhutan
BT,
/// Bouvet Island
BV,
/// Botswana
BW,
/// Belarus
BY,
/// Belize
BZ,
/// Canada
CA,
/// Cocos (Keeling) Islands
CC,
/// Congo, Democratic Republic of the
CD,
/// Central African Republic
CF,
/// Congo
CG,
/// Switzerland
CH,
/// Cote d'Ivoire
CI,
/// Cook Islands
CK,
/// Chile
CL,
/// Cameroon
CM,
/// China
CN,
/// Colombia
CO,
/// Costa Rica
CR,
/// Cuba
CU,
/// Cabo Verde
CV,
/// Curacao
CW,
/// Christmas Island
CX,
/// Cyprus
CY,
/// Czechia
CZ,
/// Germany
DE,
/// Djibouti
DJ,
/// Denmark
DK,
/// Dominica
DM,
/// Dominican Republic
DO,
/// Algeria
DZ,
/// Ecuador
EC,
/// Estonia
EE,
/// Egypt
EG,
/// Western Sahara
EH,
/// Eritrea
ER,
/// Spain
ES,
/// Ethiopia
ET,
/// Finland
FI,
/// Fiji
FJ,
/// Falkland Islands (Malvinas)
FK,
/// Micronesia (Federated States of)
FM,
/// Faroe Islands
FO,
/// France
FR,
/// Gabon
GA,
/// United Kingdom of Great Britain and Northern Ireland
GB,
/// Grenada
GD,
/// Georgia
GE,
/// French Guiana
GF,
/// Guernsey
GG,
/// Ghana
GH,
/// Gibraltar
GI,
/// Greenland
GL,
/// Gambia
GM,
/// Guinea
GN,
/// Guadeloupe
GP,
/// Equatorial Guinea
GQ,
/// Greece
GR,
/// South Georgia and the South Sandwich Islands
GS,
/// Guatemala
GT,
/// Guam
GU,
/// Guinea-Bissau
GW,
/// Guyana
GY,
/// Hong Kong
HK,
/// Heard Island and McDonald Islands
HM,
/// Honduras
HN,
/// Croatia
HR,
/// Haiti
HT,
/// Hungary
HU,
/// Indonesia
ID,
/// Ireland
IE,
/// Israel
IL,
/// Isle of Man
IM,
/// India
IN,
/// British Indian Ocean Territory
IO,
/// Iraq
IQ,
/// Iran (Islamic Republic of)
IR,
/// Iceland
IS,
/// Italy
IT,
/// Jersey
JE,
/// Jamaica
JM,
/// Jordan
JO,
/// Japan
JP,
/// Kenya
KE,
/// Kyrgyzstan
KG,
/// Cambodia
KH,
/// Kiribati
KI,
/// Comoros
KM,
/// Saint Kitts and Nevis
KN,
/// Korea (Democratic People's Republic of)
KP,
/// Korea, Republic of
KR,
/// Kuwait
KW,
/// Cayman Islands
KY,
/// Kazakhstan
KZ,
/// Lao People's Democratic Republic
LA,
/// Lebanon
LB,
/// Saint Lucia
LC,
/// Liechtenstein
LI,
/// Sri Lanka
LK,
/// Liberia
LR,
/// Lesotho
LS,
/// Lithuania
LT,
/// Luxembourg
LU,
/// Latvia
LV,
/// Libya
LY,
/// Morocco
MA,
/// Monaco
MC,
/// Moldova, Republic of
MD,
/// Montenegro
ME,
/// Saint Martin (French part)
MF,
/// Madagascar
MG,
/// Marshall Islands
MH,
/// North Macedonia
MK,
/// Mali
ML,
/// Myanmar
MM,
/// Mongolia
MN,
/// Macao
MO,
/// Northern Mariana Islands
MP,
/// Martinique
MQ,
/// Mauritania
MR,
/// Montserrat
MS,
/// Malta
MT,
/// Mauritius
MU,
/// Maldives
MV,
/// Malawi
MW,
/// Mexico
MX,
/// Malaysia
MY,
/// Mozambique
MZ,
/// Namibia
NA,
/// New Caledonia
NC,
/// Niger
NE,
/// Norfolk Island
NF,
/// Nigeria
NG,
/// Nicaragua
NI,
/// Netherlands
NL,
/// Norway
NO,
/// Nepal
NP,
/// Nauru
NR,
/// Niue
NU,
/// New Zealand
NZ,
/// Oman
OM,
/// Panama
PA,
/// Peru
PE,
/// French Polynesia
PF,
/// Papua New Guinea
PG,
/// Philippines
PH,
/// Pakistan
PK,
/// Poland
PL,
/// Saint Pierre and Miquelon
PM,
/// Pitcairn
PN,
/// Puerto Rico
PR,
/// Palestine, State of
PS,
/// Portugal
PT,
/// Palau
PW,
/// Paraguay
PY,
/// Qatar
QA,
/// Reunion
RE,
/// Romania
RO,
/// Serbia
RS,
/// Russian Federation
RU,
/// Rwanda
RW,
/// Saudi Arabia
SA,
/// Solomon Islands
SB,
/// Seychelles
SC,
/// Sudan
SD,
/// Sweden
SE,
/// Singapore
SG,
/// Saint Helena, Ascension and Tristan da Cunha
SH,
/// Slovenia
SI,
/// Svalbard and Jan Mayen
SJ,
/// Slovakia
SK,
/// Sierra Leone
SL,
/// San Marino
SM,
/// Senegal
SN,
/// Somalia
SO,
/// Suriname
SR,
/// South Sudan
SS,
/// Sao Tome and Principe
ST,
/// El Salvador
SV,
/// Sint Maarten (Dutch part)
SX,
/// Syrian Arab Republic
SY,
/// Eswatini
SZ,
/// Turks and Caicos Islands
TC,
/// Chad
TD,
/// French Southern Territories
TF,
/// Togo
TG,
/// Thailand
TH,
/// Tajikistan
TJ,
/// Tokelau
TK,
/// Timor-Leste
TL,
/// Turkmenistan
TM,
/// Tunisia
TN,
/// Tonga
TO,
/// Turkey
TR,
/// Trinidad and Tobago
TT,
/// Tuvalu
TV,
/// Taiwan, Province of China
TW,
/// Tanzania, United Republic of
TZ,
/// Ukraine
UA,
/// Uganda
UG,
/// United States Minor Outlying Islands
UM,
/// United States of America
US,
/// Uruguay
UY,
/// Uzbekistan
UZ,
/// Holy See
VA,
/// Saint Vincent and the Grenadines
VC,
/// Venezuela (Bolivarian Republic of)
VE,
/// Virgin Islands (British)
VG,
/// Virgin Islands (U.S.)
VI,
/// Viet Nam
VN,
/// Vanuatu
VU,
/// Wallis and Futuna
WF,
/// Samoa
WS,
/// Yemen
YE,
/// Mayotte
YT,
/// South Africa
ZA,
/// Zambia
ZM,
/// Zimbabwe
ZW,
}
impl Country {
/// Read an assigned code, returning `None` for unknown codes or invalid lengths.
/// Empty input and zero-filled byte arrays are not codes.
pub const fn from_bytes(input: &[u8]) -> Option<Country> {
match input {
b"AD" => Some(Country::AD),
b"AE" => Some(Country::AE),
b"AF" => Some(Country::AF),
b"AG" => Some(Country::AG),
b"AI" => Some(Country::AI),
b"AL" => Some(Country::AL),
b"AM" => Some(Country::AM),
b"AO" => Some(Country::AO),
b"AQ" => Some(Country::AQ),
b"AR" => Some(Country::AR),
b"AS" => Some(Country::AS),
b"AT" => Some(Country::AT),
b"AU" => Some(Country::AU),
b"AW" => Some(Country::AW),
b"AX" => Some(Country::AX),
b"AZ" => Some(Country::AZ),
b"BA" => Some(Country::BA),
b"BB" => Some(Country::BB),
b"BD" => Some(Country::BD),
b"BE" => Some(Country::BE),
b"BF" => Some(Country::BF),
b"BG" => Some(Country::BG),
b"BH" => Some(Country::BH),
b"BI" => Some(Country::BI),
b"BJ" => Some(Country::BJ),
b"BL" => Some(Country::BL),
b"BM" => Some(Country::BM),
b"BN" => Some(Country::BN),
b"BO" => Some(Country::BO),
b"BQ" => Some(Country::BQ),
b"BR" => Some(Country::BR),
b"BS" => Some(Country::BS),
b"BT" => Some(Country::BT),
b"BV" => Some(Country::BV),
b"BW" => Some(Country::BW),
b"BY" => Some(Country::BY),
b"BZ" => Some(Country::BZ),
b"CA" => Some(Country::CA),
b"CC" => Some(Country::CC),
b"CD" => Some(Country::CD),
b"CF" => Some(Country::CF),
b"CG" => Some(Country::CG),
b"CH" => Some(Country::CH),
b"CI" => Some(Country::CI),
b"CK" => Some(Country::CK),
b"CL" => Some(Country::CL),
b"CM" => Some(Country::CM),
b"CN" => Some(Country::CN),
b"CO" => Some(Country::CO),
b"CR" => Some(Country::CR),
b"CU" => Some(Country::CU),
b"CV" => Some(Country::CV),
b"CW" => Some(Country::CW),
b"CX" => Some(Country::CX),
b"CY" => Some(Country::CY),
b"CZ" => Some(Country::CZ),
b"DE" => Some(Country::DE),
b"DJ" => Some(Country::DJ),
b"DK" => Some(Country::DK),
b"DM" => Some(Country::DM),
b"DO" => Some(Country::DO),
b"DZ" => Some(Country::DZ),
b"EC" => Some(Country::EC),
b"EE" => Some(Country::EE),
b"EG" => Some(Country::EG),
b"EH" => Some(Country::EH),
b"ER" => Some(Country::ER),
b"ES" => Some(Country::ES),
b"ET" => Some(Country::ET),
b"FI" => Some(Country::FI),
b"FJ" => Some(Country::FJ),
b"FK" => Some(Country::FK),
b"FM" => Some(Country::FM),
b"FO" => Some(Country::FO),
b"FR" => Some(Country::FR),
b"GA" => Some(Country::GA),
b"GB" => Some(Country::GB),
b"GD" => Some(Country::GD),
b"GE" => Some(Country::GE),
b"GF" => Some(Country::GF),
b"GG" => Some(Country::GG),
b"GH" => Some(Country::GH),
b"GI" => Some(Country::GI),
b"GL" => Some(Country::GL),
b"GM" => Some(Country::GM),
b"GN" => Some(Country::GN),
b"GP" => Some(Country::GP),
b"GQ" => Some(Country::GQ),
b"GR" => Some(Country::GR),
b"GS" => Some(Country::GS),
b"GT" => Some(Country::GT),
b"GU" => Some(Country::GU),
b"GW" => Some(Country::GW),
b"GY" => Some(Country::GY),
b"HK" => Some(Country::HK),
b"HM" => Some(Country::HM),
b"HN" => Some(Country::HN),
b"HR" => Some(Country::HR),
b"HT" => Some(Country::HT),
b"HU" => Some(Country::HU),
b"ID" => Some(Country::ID),
b"IE" => Some(Country::IE),
b"IL" => Some(Country::IL),
b"IM" => Some(Country::IM),
b"IN" => Some(Country::IN),
b"IO" => Some(Country::IO),
b"IQ" => Some(Country::IQ),
b"IR" => Some(Country::IR),
b"IS" => Some(Country::IS),
b"IT" => Some(Country::IT),
b"JE" => Some(Country::JE),
b"JM" => Some(Country::JM),
b"JO" => Some(Country::JO),
b"JP" => Some(Country::JP),
b"KE" => Some(Country::KE),
b"KG" => Some(Country::KG),
b"KH" => Some(Country::KH),
b"KI" => Some(Country::KI),
b"KM" => Some(Country::KM),
b"KN" => Some(Country::KN),
b"KP" => Some(Country::KP),
b"KR" => Some(Country::KR),
b"KW" => Some(Country::KW),
b"KY" => Some(Country::KY),
b"KZ" => Some(Country::KZ),
b"LA" => Some(Country::LA),
b"LB" => Some(Country::LB),
b"LC" => Some(Country::LC),
b"LI" => Some(Country::LI),
b"LK" => Some(Country::LK),
b"LR" => Some(Country::LR),
b"LS" => Some(Country::LS),
b"LT" => Some(Country::LT),
b"LU" => Some(Country::LU),
b"LV" => Some(Country::LV),
b"LY" => Some(Country::LY),
b"MA" => Some(Country::MA),
b"MC" => Some(Country::MC),
b"MD" => Some(Country::MD),
b"ME" => Some(Country::ME),
b"MF" => Some(Country::MF),
b"MG" => Some(Country::MG),
b"MH" => Some(Country::MH),
b"MK" => Some(Country::MK),
b"ML" => Some(Country::ML),
b"MM" => Some(Country::MM),
b"MN" => Some(Country::MN),
b"MO" => Some(Country::MO),
b"MP" => Some(Country::MP),
b"MQ" => Some(Country::MQ),
b"MR" => Some(Country::MR),
b"MS" => Some(Country::MS),
b"MT" => Some(Country::MT),
b"MU" => Some(Country::MU),
b"MV" => Some(Country::MV),
b"MW" => Some(Country::MW),
b"MX" => Some(Country::MX),
b"MY" => Some(Country::MY),
b"MZ" => Some(Country::MZ),
b"NA" => Some(Country::NA),
b"NC" => Some(Country::NC),
b"NE" => Some(Country::NE),
b"NF" => Some(Country::NF),
b"NG" => Some(Country::NG),
b"NI" => Some(Country::NI),
b"NL" => Some(Country::NL),
b"NO" => Some(Country::NO),
b"NP" => Some(Country::NP),
b"NR" => Some(Country::NR),
b"NU" => Some(Country::NU),
b"NZ" => Some(Country::NZ),
b"OM" => Some(Country::OM),
b"PA" => Some(Country::PA),
b"PE" => Some(Country::PE),
b"PF" => Some(Country::PF),
b"PG" => Some(Country::PG),
b"PH" => Some(Country::PH),
b"PK" => Some(Country::PK),
b"PL" => Some(Country::PL),
b"PM" => Some(Country::PM),
b"PN" => Some(Country::PN),
b"PR" => Some(Country::PR),
b"PS" => Some(Country::PS),
b"PT" => Some(Country::PT),
b"PW" => Some(Country::PW),
b"PY" => Some(Country::PY),
b"QA" => Some(Country::QA),
b"RE" => Some(Country::RE),
b"RO" => Some(Country::RO),
b"RS" => Some(Country::RS),
b"RU" => Some(Country::RU),
b"RW" => Some(Country::RW),
b"SA" => Some(Country::SA),
b"SB" => Some(Country::SB),
b"SC" => Some(Country::SC),
b"SD" => Some(Country::SD),
b"SE" => Some(Country::SE),
b"SG" => Some(Country::SG),
b"SH" => Some(Country::SH),
b"SI" => Some(Country::SI),
b"SJ" => Some(Country::SJ),
b"SK" => Some(Country::SK),
b"SL" => Some(Country::SL),
b"SM" => Some(Country::SM),
b"SN" => Some(Country::SN),
b"SO" => Some(Country::SO),
b"SR" => Some(Country::SR),
b"SS" => Some(Country::SS),
b"ST" => Some(Country::ST),
b"SV" => Some(Country::SV),
b"SX" => Some(Country::SX),
b"SY" => Some(Country::SY),
b"SZ" => Some(Country::SZ),
b"TC" => Some(Country::TC),
b"TD" => Some(Country::TD),
b"TF" => Some(Country::TF),
b"TG" => Some(Country::TG),
b"TH" => Some(Country::TH),
b"TJ" => Some(Country::TJ),
b"TK" => Some(Country::TK),
b"TL" => Some(Country::TL),
b"TM" => Some(Country::TM),
b"TN" => Some(Country::TN),
b"TO" => Some(Country::TO),
b"TR" => Some(Country::TR),
b"TT" => Some(Country::TT),
b"TV" => Some(Country::TV),
b"TW" => Some(Country::TW),
b"TZ" => Some(Country::TZ),
b"UA" => Some(Country::UA),
b"UG" => Some(Country::UG),
b"UM" => Some(Country::UM),
b"US" => Some(Country::US),
b"UY" => Some(Country::UY),
b"UZ" => Some(Country::UZ),
b"VA" => Some(Country::VA),
b"VC" => Some(Country::VC),
b"VE" => Some(Country::VE),
b"VG" => Some(Country::VG),
b"VI" => Some(Country::VI),
b"VN" => Some(Country::VN),
b"VU" => Some(Country::VU),
b"WF" => Some(Country::WF),
b"WS" => Some(Country::WS),
b"YE" => Some(Country::YE),
b"YT" => Some(Country::YT),
b"ZA" => Some(Country::ZA),
b"ZM" => Some(Country::ZM),
b"ZW" => Some(Country::ZW),
_ => None,
}
}
/// Whether no country has been specified.
pub const fn is_empty(&self) -> bool {
matches!(self, Self::Unspecified)
}
/// Return the two-letter country code, or two zero bytes if unspecified.
pub const fn to_bytes(self) -> [u8; 2] {
*self.as_bytes()
}
/// Borrow the two-letter country code as a string.
/// Returns an empty string if unspecified.
pub const fn as_str(&self) -> &'static str {
self.as_fix_str().as_utf8()
}
/// Borrow the two-letter country code as a FIX string.
/// Returns an empty string if unspecified.
pub const fn as_fix_str(&self) -> &'static FixStr {
if self.is_empty() {
fix_str!("")
} else {
// SAFETY: Specified codes contain only uppercase ASCII letters.
unsafe { FixStr::from_ascii_unchecked(self.as_bytes()) }
}
}
/// Borrow the two-letter country code, or two zero bytes if unspecified.
pub const fn as_bytes(&self) -> &'static [u8; 2] {
match self {
Country::Unspecified => &[0; 2],
Country::AD => b"AD",
Country::AE => b"AE",
Country::AF => b"AF",
Country::AG => b"AG",
Country::AI => b"AI",
Country::AL => b"AL",
Country::AM => b"AM",
Country::AO => b"AO",
Country::AQ => b"AQ",
Country::AR => b"AR",
Country::AS => b"AS",
Country::AT => b"AT",
Country::AU => b"AU",
Country::AW => b"AW",
Country::AX => b"AX",
Country::AZ => b"AZ",
Country::BA => b"BA",
Country::BB => b"BB",
Country::BD => b"BD",
Country::BE => b"BE",
Country::BF => b"BF",
Country::BG => b"BG",
Country::BH => b"BH",
Country::BI => b"BI",
Country::BJ => b"BJ",
Country::BL => b"BL",
Country::BM => b"BM",
Country::BN => b"BN",
Country::BO => b"BO",
Country::BQ => b"BQ",
Country::BR => b"BR",
Country::BS => b"BS",
Country::BT => b"BT",
Country::BV => b"BV",
Country::BW => b"BW",
Country::BY => b"BY",
Country::BZ => b"BZ",
Country::CA => b"CA",
Country::CC => b"CC",
Country::CD => b"CD",
Country::CF => b"CF",
Country::CG => b"CG",
Country::CH => b"CH",
Country::CI => b"CI",
Country::CK => b"CK",
Country::CL => b"CL",
Country::CM => b"CM",
Country::CN => b"CN",
Country::CO => b"CO",
Country::CR => b"CR",
Country::CU => b"CU",
Country::CV => b"CV",
Country::CW => b"CW",
Country::CX => b"CX",
Country::CY => b"CY",
Country::CZ => b"CZ",
Country::DE => b"DE",
Country::DJ => b"DJ",
Country::DK => b"DK",
Country::DM => b"DM",
Country::DO => b"DO",
Country::DZ => b"DZ",
Country::EC => b"EC",
Country::EE => b"EE",
Country::EG => b"EG",
Country::EH => b"EH",
Country::ER => b"ER",
Country::ES => b"ES",
Country::ET => b"ET",
Country::FI => b"FI",
Country::FJ => b"FJ",
Country::FK => b"FK",
Country::FM => b"FM",
Country::FO => b"FO",
Country::FR => b"FR",
Country::GA => b"GA",
Country::GB => b"GB",
Country::GD => b"GD",
Country::GE => b"GE",
Country::GF => b"GF",
Country::GG => b"GG",
Country::GH => b"GH",
Country::GI => b"GI",
Country::GL => b"GL",
Country::GM => b"GM",
Country::GN => b"GN",
Country::GP => b"GP",
Country::GQ => b"GQ",
Country::GR => b"GR",
Country::GS => b"GS",
Country::GT => b"GT",
Country::GU => b"GU",
Country::GW => b"GW",
Country::GY => b"GY",
Country::HK => b"HK",
Country::HM => b"HM",
Country::HN => b"HN",
Country::HR => b"HR",
Country::HT => b"HT",
Country::HU => b"HU",
Country::ID => b"ID",
Country::IE => b"IE",
Country::IL => b"IL",
Country::IM => b"IM",
Country::IN => b"IN",
Country::IO => b"IO",
Country::IQ => b"IQ",
Country::IR => b"IR",
Country::IS => b"IS",
Country::IT => b"IT",
Country::JE => b"JE",
Country::JM => b"JM",
Country::JO => b"JO",
Country::JP => b"JP",
Country::KE => b"KE",
Country::KG => b"KG",
Country::KH => b"KH",
Country::KI => b"KI",
Country::KM => b"KM",
Country::KN => b"KN",
Country::KP => b"KP",
Country::KR => b"KR",
Country::KW => b"KW",
Country::KY => b"KY",
Country::KZ => b"KZ",
Country::LA => b"LA",
Country::LB => b"LB",
Country::LC => b"LC",
Country::LI => b"LI",
Country::LK => b"LK",
Country::LR => b"LR",
Country::LS => b"LS",
Country::LT => b"LT",
Country::LU => b"LU",
Country::LV => b"LV",
Country::LY => b"LY",
Country::MA => b"MA",
Country::MC => b"MC",
Country::MD => b"MD",
Country::ME => b"ME",
Country::MF => b"MF",
Country::MG => b"MG",
Country::MH => b"MH",
Country::MK => b"MK",
Country::ML => b"ML",
Country::MM => b"MM",
Country::MN => b"MN",
Country::MO => b"MO",
Country::MP => b"MP",
Country::MQ => b"MQ",
Country::MR => b"MR",
Country::MS => b"MS",
Country::MT => b"MT",
Country::MU => b"MU",
Country::MV => b"MV",
Country::MW => b"MW",
Country::MX => b"MX",
Country::MY => b"MY",
Country::MZ => b"MZ",
Country::NA => b"NA",
Country::NC => b"NC",
Country::NE => b"NE",
Country::NF => b"NF",
Country::NG => b"NG",
Country::NI => b"NI",
Country::NL => b"NL",
Country::NO => b"NO",
Country::NP => b"NP",
Country::NR => b"NR",
Country::NU => b"NU",
Country::NZ => b"NZ",
Country::OM => b"OM",
Country::PA => b"PA",
Country::PE => b"PE",
Country::PF => b"PF",
Country::PG => b"PG",
Country::PH => b"PH",
Country::PK => b"PK",
Country::PL => b"PL",
Country::PM => b"PM",
Country::PN => b"PN",
Country::PR => b"PR",
Country::PS => b"PS",
Country::PT => b"PT",
Country::PW => b"PW",
Country::PY => b"PY",
Country::QA => b"QA",
Country::RE => b"RE",
Country::RO => b"RO",
Country::RS => b"RS",
Country::RU => b"RU",
Country::RW => b"RW",
Country::SA => b"SA",
Country::SB => b"SB",
Country::SC => b"SC",
Country::SD => b"SD",
Country::SE => b"SE",
Country::SG => b"SG",
Country::SH => b"SH",
Country::SI => b"SI",
Country::SJ => b"SJ",
Country::SK => b"SK",
Country::SL => b"SL",
Country::SM => b"SM",
Country::SN => b"SN",
Country::SO => b"SO",
Country::SR => b"SR",
Country::SS => b"SS",
Country::ST => b"ST",
Country::SV => b"SV",
Country::SX => b"SX",
Country::SY => b"SY",
Country::SZ => b"SZ",
Country::TC => b"TC",
Country::TD => b"TD",
Country::TF => b"TF",
Country::TG => b"TG",
Country::TH => b"TH",
Country::TJ => b"TJ",
Country::TK => b"TK",
Country::TL => b"TL",
Country::TM => b"TM",
Country::TN => b"TN",
Country::TO => b"TO",
Country::TR => b"TR",
Country::TT => b"TT",
Country::TV => b"TV",
Country::TW => b"TW",
Country::TZ => b"TZ",
Country::UA => b"UA",
Country::UG => b"UG",
Country::UM => b"UM",
Country::US => b"US",
Country::UY => b"UY",
Country::UZ => b"UZ",
Country::VA => b"VA",
Country::VC => b"VC",
Country::VE => b"VE",
Country::VG => b"VG",
Country::VI => b"VI",
Country::VN => b"VN",
Country::VU => b"VU",
Country::WF => b"WF",
Country::WS => b"WS",
Country::YE => b"YE",
Country::YT => b"YT",
Country::ZA => b"ZA",
Country::ZM => b"ZM",
Country::ZW => b"ZW",
}
}
}