Struct phonenumber::metadata::loader::Metadata

source ·
pub struct Metadata {
Show 30 fields pub general: Option<Descriptor>, pub fixed_line: Option<Descriptor>, pub mobile: Option<Descriptor>, pub toll_free: Option<Descriptor>, pub premium_rate: Option<Descriptor>, pub shared_cost: Option<Descriptor>, pub personal_number: Option<Descriptor>, pub voip: Option<Descriptor>, pub pager: Option<Descriptor>, pub uan: Option<Descriptor>, pub emergency: Option<Descriptor>, pub voicemail: Option<Descriptor>, pub short_code: Option<Descriptor>, pub standard_rate: Option<Descriptor>, pub carrier: Option<Descriptor>, pub no_international: Option<Descriptor>, pub id: Option<String>, pub country_code: Option<u16>, pub international_prefix: Option<String>, pub preferred_international_prefix: Option<String>, pub national_prefix: Option<String>, pub preferred_extension_prefix: Option<String>, pub national_prefix_for_parsing: Option<String>, pub national_prefix_transform_rule: Option<String>, pub formats: Vec<Format>, pub international_formats: Vec<Format>, pub main_country_for_code: bool, pub leading_digits: Option<String>, pub mobile_number_portable: bool, pub defaults: Defaults,
}
Expand description

Parsed version of metadata::Metadata.

Fields§

§general: Option<Descriptor>§fixed_line: Option<Descriptor>§mobile: Option<Descriptor>§toll_free: Option<Descriptor>§premium_rate: Option<Descriptor>§shared_cost: Option<Descriptor>§personal_number: Option<Descriptor>§voip: Option<Descriptor>§pager: Option<Descriptor>§uan: Option<Descriptor>§emergency: Option<Descriptor>§voicemail: Option<Descriptor>§short_code: Option<Descriptor>§standard_rate: Option<Descriptor>§carrier: Option<Descriptor>§no_international: Option<Descriptor>§id: Option<String>§country_code: Option<u16>§international_prefix: Option<String>§preferred_international_prefix: Option<String>§national_prefix: Option<String>§preferred_extension_prefix: Option<String>§national_prefix_for_parsing: Option<String>§national_prefix_transform_rule: Option<String>§formats: Vec<Format>§international_formats: Vec<Format>§main_country_for_code: bool§leading_digits: Option<String>§mobile_number_portable: bool§defaults: Defaults

Trait Implementations§

source§

impl Clone for Metadata

source§

fn clone(&self) -> Metadata

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metadata

source§

fn default() -> Metadata

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Metadata

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Metadata

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,