Struct LocalePreferences
pub struct LocalePreferences { /* private fields */ }
Expand description
The structure storing locale subtags used in preferences.
Implementations§
§impl LocalePreferences
impl LocalePreferences
pub fn to_data_locale_region_priority(self) -> DataLocale
pub fn to_data_locale_region_priority(self) -> DataLocale
Convert to a DataLocale, with region-based fallback priority
Most users should use icu_provider::marker::make_locale()
instead.
pub fn to_data_locale_language_priority(self) -> DataLocale
pub fn to_data_locale_language_priority(self) -> DataLocale
Convert to a DataLocale, with language-based fallback priority
Most users should use icu_provider::marker::make_locale()
instead.
§impl LocalePreferences
impl LocalePreferences
pub const fn default() -> LocalePreferences
pub const fn default() -> LocalePreferences
Constructs a new LocalePreferences
struct with the defaults.
pub fn extend(&mut self, other: LocalePreferences)
pub fn extend(&mut self, other: LocalePreferences)
Extends the preferences with the values from another set of preferences.
Trait Implementations§
§impl Clone for LocalePreferences
impl Clone for LocalePreferences
§fn clone(&self) -> LocalePreferences
fn clone(&self) -> LocalePreferences
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for LocalePreferences
impl Debug for LocalePreferences
§impl Default for LocalePreferences
impl Default for LocalePreferences
§fn default() -> LocalePreferences
fn default() -> LocalePreferences
Returns the “default value” for a type. Read more
§impl From<&LanguageIdentifier> for LocalePreferences
impl From<&LanguageIdentifier> for LocalePreferences
§fn from(lid: &LanguageIdentifier) -> LocalePreferences
fn from(lid: &LanguageIdentifier) -> LocalePreferences
Converts to this type from the input type.
§impl From<&Locale> for LocalePreferences
impl From<&Locale> for LocalePreferences
§fn from(loc: &Locale) -> LocalePreferences
fn from(loc: &Locale) -> LocalePreferences
Converts to this type from the input type.
§impl From<LocalePreferences> for Locale
impl From<LocalePreferences> for Locale
§fn from(prefs: LocalePreferences) -> Locale
fn from(prefs: LocalePreferences) -> Locale
Converts to this type from the input type.
§impl Hash for LocalePreferences
impl Hash for LocalePreferences
§impl PartialEq for LocalePreferences
impl PartialEq for LocalePreferences
impl Copy for LocalePreferences
impl Eq for LocalePreferences
impl StructuralPartialEq for LocalePreferences
Auto Trait Implementations§
impl Freeze for LocalePreferences
impl RefUnwindSafe for LocalePreferences
impl Send for LocalePreferences
impl Sync for LocalePreferences
impl Unpin for LocalePreferences
impl UnwindSafe for LocalePreferences
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more