Struct language_tags::LanguageTag [] [src]

pub struct LanguageTag {
    // some fields omitted
}

A language tag as desribed in BCP47

Methods

impl LanguageTag
[src]

fn matches(&self, other: &LanguageTag) -> bool

Matches language tags like described in rfc4647#Extended filtering

For example en-GB matches only en-GB and en-Arab-GB but not en. While en matches all of en, en-GB ,en-Arab and en-Arab-GB.

Trait Implementations

impl Clone for LanguageTag
[src]

fn clone(&self) -> LanguageTag

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Eq for LanguageTag
[src]

impl PartialEq for LanguageTag
[src]

fn eq(&self, __arg_0: &LanguageTag) -> bool

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

fn ne(&self, __arg_0: &LanguageTag) -> bool

This method tests for !=.

impl Debug for LanguageTag
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for LanguageTag
[src]

fn default() -> LanguageTag

Returns the "default value" for a type. Read more

impl FromStr for LanguageTag
[src]

type Err = ()

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, ()>

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

impl Display for LanguageTag
[src]

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

Formats the value using the given formatter.