Struct phonenumber::PhoneNumber[][src]

pub struct PhoneNumber { /* fields omitted */ }

A phone number.

Methods

impl PhoneNumber
[src]

Get information about the country for the phone number.

Get the country code.

Get the national number.

Get the extension.

Get the carrier.

Prepare a formatter for this PhoneNumber.

Example

use phonenumber::{self, country, Mode};

let number = phonenumber::parse(Some(country::DE), "301/23456").unwrap()
    .format().mode(Mode::National).to_string();

assert_eq!("030 123456", number);

Prepare a formatter for this PhoneNumber with the given Database.

Get the metadata that applies to this phone number from the given database.

Check if the phone number is valid.

Check if the phone number is valid with the given Database.

Trait Implementations

impl Clone for PhoneNumber
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for PhoneNumber
[src]

impl PartialEq for PhoneNumber
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for PhoneNumber
[src]

Formats the value using the given formatter. Read more

impl FromStr for PhoneNumber
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Display for PhoneNumber
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for PhoneNumber

impl Sync for PhoneNumber