#[non_exhaustive]pub struct LocaleSettings {
pub languages: Languages,
pub time_zone: TimeZone,
pub hour_cycle: HourCycle,
pub first_day_of_week: Weekday,
pub measurement_system: MeasurementSystem,
pub temperature_unit: TemperatureUnit,
}Expand description
The user’s locale settings beside the locale (locale_settings(); TS
localeSettings()): the preferred languages, the time zone and the
regional preferences the systems keep beside the language (Language &
Region on Apple platforms, Android’s regional preferences, Windows’
region settings). They change together, as the user changes the
system’s settings or travels. Where the user set no regional preference,
it is the region’s. The names are Intl’s and Foundation’s, so they
pass into Intl’s options as they are.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.languages: LanguagesThe preferred languages, most preferred first (the system’s list: the language apps show their text in, then its fallbacks).
time_zone: TimeZoneThe device’s time zone, as the system names it (Europe/Berlin).
hour_cycle: HourCycle12- or 24-hour time.
first_day_of_week: WeekdayThe day weeks start on: a calendar’s first column.
measurement_system: MeasurementSystemThe units of lengths, weights and volumes.
temperature_unit: TemperatureUnitThe unit of temperatures.
Trait Implementations§
Source§impl Clone for LocaleSettings
impl Clone for LocaleSettings
Source§fn clone(&self) -> LocaleSettings
fn clone(&self) -> LocaleSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LocaleSettings
Source§impl Debug for LocaleSettings
impl Debug for LocaleSettings
Source§impl Default for LocaleSettings
impl Default for LocaleSettings
Source§fn default() -> LocaleSettings
fn default() -> LocaleSettings
impl Eq for LocaleSettings
Source§impl Hash for LocaleSettings
impl Hash for LocaleSettings
Source§impl PartialEq for LocaleSettings
impl PartialEq for LocaleSettings
impl StructuralPartialEq for LocaleSettings
Auto Trait Implementations§
impl Forget for LocaleSettings
impl Freeze for LocaleSettings
impl Move for LocaleSettings
impl RefUnwindSafe for LocaleSettings
impl Send for LocaleSettings
impl Sync for LocaleSettings
impl Unpin for LocaleSettings
impl UnsafeUnpin for LocaleSettings
impl UnwindSafe for LocaleSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.