pub enum PhoneNumberFormat {
E164,
International,
National,
RFC3966,
}Expand description
Defines the various standardized formats for representing phone numbers.
INTERNATIONAL and NATIONAL formats align with the ITU-T E.123 recommendation,
but use local conventions like hyphens (-) instead of spaces for separators.
For example, the Google Switzerland office number would be:
- INTERNATIONAL:
+41 44 668 1800 - NATIONAL:
044 668 1800 - E164:
+41446681800(international format without formatting) - RFC3966:
tel:+41-44-668-1800(hyphen-separated with a “tel:” prefix)
Variants§
E164
E.164 format.
This is a standardized international format with no spaces or symbols,
always starting with a + followed by the country code.
Example: +41446681800.
International
International format.
This format includes the country code and is formatted with spaces
for readability, as recommended for international display.
Example: +41 44 668 1800.
National
National format.
This format is used for dialing within the number’s own country.
It may include a national prefix (like ‘0’) and uses local formatting conventions.
Example: 044 668 1800.
RFC3966
RFC3966 format.
A technical format used in contexts like web links. It starts with “tel:”,
uses hyphens as separators, and can include extensions.
Example: tel:+41-44-668-1800.
Trait Implementations§
Source§impl Clone for PhoneNumberFormat
impl Clone for PhoneNumberFormat
Source§fn clone(&self) -> PhoneNumberFormat
fn clone(&self) -> PhoneNumberFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more