[−][src]Trait locale_types::id::LocaleIdentifier
Common trait for different kinds of locale identifier.
Required methods
fn new(language_code: String) -> LocaleResult<Self>
Construct a new identifier with the given language code only.
fn with_language(&self, language_code: String) -> LocaleResult<Self>
Return a new identifier based on self
with a new language code.
fn with_territory(&self, territory: String) -> LocaleResult<Self>
Return a new identifier based on self
with a new territory code.
fn with_code_set(&self, code_set: String) -> LocaleResult<Self>
Return a new identifier based on self
with a new code_set code.
fn with_modifier(&self, modifier: String) -> LocaleResult<Self>
Return a new identifier based on self
with a new modifier string.
fn with_modifiers<K, V>(&self, modifiers: HashMap<K, V>) -> LocaleResult<Self> where
K: Display,
V: Display,
K: Display,
V: Display,
Return a new identifier based on self
with a new modifier string.
fn language_code(&self) -> String
Return the current language code.
fn territory(&self) -> Option<String>
Return the current territory/country code.
fn code_set(&self) -> Option<String>
Return the current code set/charset code.
fn modifier(&self) -> Option<String>
Return the current modifier string.
Implementors
impl LocaleIdentifier for LocaleString
[src]
fn new(language_code: String) -> LocaleResult<Self>
[src]
fn with_language(&self, language_code: String) -> LocaleResult<Self>
[src]
fn with_territory(&self, territory: String) -> LocaleResult<Self>
[src]
fn with_code_set(&self, code_set: String) -> LocaleResult<Self>
[src]
fn with_modifier(&self, modifier: String) -> LocaleResult<Self>
[src]
fn with_modifiers<K, V>(&self, modifiers: HashMap<K, V>) -> LocaleResult<Self> where
K: Display,
V: Display,
[src]
K: Display,
V: Display,