Struct icu_locale_core::preferences::LocalePreferences
source · pub struct LocalePreferences {
pub language: Language,
pub script: Option<Script>,
pub region: Option<Region>,
pub variant: Option<Variant>,
pub subdivision: Option<Subtag>,
pub ue_region: Option<Region>,
}
Expand description
The structure storing locale subtags used in preferences.
Fields§
§language: Language
Preference of Language
script: Option<Script>
Preference of Script
region: Option<Region>
Preference of Region
variant: Option<Variant>
Preference of Variant
subdivision: Option<Subtag>
Preference of Regional Subdivision
ue_region: Option<Region>
Preference of Unicode Extension Region
Implementations§
source§impl LocalePreferences
impl LocalePreferences
sourcepub const fn default() -> Self
pub const fn default() -> Self
Constructs a new LocalePreferences
struct with the defaults.
sourcepub 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§
source§impl Clone for LocalePreferences
impl Clone for LocalePreferences
source§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 moresource§impl Debug for LocalePreferences
impl Debug for LocalePreferences
source§impl Default for LocalePreferences
impl Default for LocalePreferences
source§impl From<&LanguageIdentifier> for LocalePreferences
impl From<&LanguageIdentifier> for LocalePreferences
source§fn from(lid: &LanguageIdentifier) -> Self
fn from(lid: &LanguageIdentifier) -> Self
Converts to this type from the input type.
source§impl From<&Locale> for LocalePreferences
impl From<&Locale> for LocalePreferences
source§impl From<LocalePreferences> for Locale
impl From<LocalePreferences> for Locale
source§fn from(prefs: LocalePreferences) -> Self
fn from(prefs: LocalePreferences) -> Self
Converts to this type from the input type.
source§impl Hash for LocalePreferences
impl Hash for LocalePreferences
source§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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