Enum phonenumber::Validation [] [src]

pub enum Validation {
    IsPossible,
    IsPossibleLocalOnly,
    InvalidCountryCode,
    TooShort,
    InvalidLength,
    TooLong,
}

Possible outcomes when testing if a PhoneNumber is possible.

Variants

The number length matches that of valid numbers for this region.

The number length matches that of local numbers for this region only (i.e. numbers that may be able to be dialled within an area, but do not have all the information to be dialled from anywhere inside or outside the country).

The number has an invalid country calling code.

The number is shorter than all valid numbers for this region.

The number is longer than the shortest valid numbers for this region, shorter than the longest valid numbers for this region, and does not itself have a number length that matches valid numbers for this region.

The number is longer than all valid numbers for this region.

Methods

impl Validation
[src]

[src]

Whether it's a possible number.

[src]

Whether it's an invalid number.

[src]

Whether the length is invalid.

Trait Implementations

impl Copy for Validation
[src]

impl Clone for Validation
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Validation
[src]

impl PartialEq for Validation
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Debug for Validation
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Validation

impl Sync for Validation