Enum phonenumber::country::Source
source · pub enum Source {
Plus,
Idd,
Number,
Default,
}
Expand description
The source from which the country code is derived. This is not set in the general parsing method, but in the method that parses and keeps raw_input.
Variants§
Plus
The country code is derived based on a phone number with a leading “+”, e.g. the French number “+33 1 42 68 53 00”.
Idd
The country code is derived based on a phone number with a leading IDD, e.g. the French number “011 33 1 42 68 53 00”, as it is dialled from US.
Number
The country code is derived based on a phone number without a leading “+”, e.g. the French number “33 1 42 68 53 00” when the default country is supplied as France.
Default
The country code is derived NOT based on the phone number itself, but from the default country parameter provided in the parsing function by the clients. This happens mostly for numbers written in the national format (without country code). For example, this would be set when parsing the French number “01 42 68 53 00”, when the default country is supplied as France.