pub enum Locale {
Show 13 variants
EnUs,
EnGb,
DeCh,
FrCh,
ItCh,
DeDe,
FrFr,
ItIt,
UkUa,
SrLatn,
SrCyrl,
PlPl,
EsEs,
}Expand description
A formatting locale — drives digit grouping, the decimal mark, currency placement, and the
date order + month names. Map a device language tag (e.g. from a locale plugin) to one with
Locale::from_tag.
Variants§
EnUs
EnGb
DeCh
Swiss German — 1'234.50, 31.12.2026.
FrCh
Swiss French — 1'234.50, 31.12.2026.
ItCh
Swiss Italian — 1'234.50, 31.12.2026.
DeDe
FrFr
ItIt
UkUa
Ukrainian — 1 234,50 (no-break space grouping), 31.12.2026, січень.
SrLatn
Serbian, Latin script — 1.234,50, 31.12.2026., januar.
SrCyrl
Serbian, Cyrillic script — 1.234,50, 31.12.2026., јануар.
PlPl
Polish — 1234,50 and 12 345,50 (no-break space grouping from five digits, as the platform does),
31.12.2026, styczeń.
EsEs
Spanish (Spain; every es tag maps here) — 1234,50 and 12.345,50 (grouping from five digits, as
the platform does), 31/12/2026, enero.
Implementations§
Trait Implementations§
impl Copy for Locale
Source§impl<'de> Deserialize<'de> for Locale
impl<'de> Deserialize<'de> for Locale
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Locale
impl StructuralPartialEq for Locale
Auto Trait Implementations§
impl Forget for Locale
impl Freeze for Locale
impl Move for Locale
impl RefUnwindSafe for Locale
impl Send for Locale
impl Sync for Locale
impl Unpin for Locale
impl UnsafeUnpin for Locale
impl UnwindSafe for Locale
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