pub struct LocaleString { /* private fields */ }Expand description
A LocaleString is a representation of the POSIX notion of a Locale
identifier, used in operating system calls and environment variables.
It implements the LocaleIdentifier trait.
Trait Implementations§
Source§impl Debug for LocaleString
impl Debug for LocaleString
Source§impl Display for LocaleString
impl Display for LocaleString
Source§impl FromStr for LocaleString
impl FromStr for LocaleString
Source§impl LocaleIdentifier for LocaleString
impl LocaleIdentifier for LocaleString
Source§fn new(language_code: String) -> LocaleResult<Self>
fn new(language_code: String) -> LocaleResult<Self>
Construct a new identifier with the given language code only.
Source§fn with_language(&self, language_code: String) -> LocaleResult<Self>
fn with_language(&self, language_code: String) -> LocaleResult<Self>
Return a new identifier based on
self with a new language code.Source§fn with_territory(&self, territory: String) -> LocaleResult<Self>
fn with_territory(&self, territory: String) -> LocaleResult<Self>
Return a new identifier based on
self with a new territory code.Source§fn with_code_set(&self, code_set: String) -> LocaleResult<Self>
fn with_code_set(&self, code_set: String) -> LocaleResult<Self>
Return a new identifier based on
self with a new code_set code.Source§fn with_modifier(&self, modifier: String) -> LocaleResult<Self>
fn with_modifier(&self, modifier: String) -> LocaleResult<Self>
Return a new identifier based on
self with a new modifier string.Source§fn with_modifiers<K, V>(&self, modifiers: HashMap<K, V>) -> LocaleResult<Self>
fn with_modifiers<K, V>(&self, modifiers: HashMap<K, V>) -> LocaleResult<Self>
Return a new identifier based on
self with a new modifier string.Source§fn language_code(&self) -> String
fn language_code(&self) -> String
Return the current language code.
Source§impl PartialEq for LocaleString
impl PartialEq for LocaleString
impl StructuralPartialEq for LocaleString
Auto Trait Implementations§
impl Freeze for LocaleString
impl RefUnwindSafe for LocaleString
impl Send for LocaleString
impl Sync for LocaleString
impl Unpin for LocaleString
impl UnwindSafe for LocaleString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more