Enum num_format::Locale

source ·
pub enum Locale {
Show 542 variants af, af_NA, agq, ak, am, ar, ar_AE, ar_BH, ar_DJ, ar_DZ, ar_EG, ar_EH, ar_ER, ar_IL, ar_IQ, ar_JO, ar_KM, ar_KW, ar_LB, ar_LY, ar_MA, ar_MR, ar_OM, ar_PS, ar_QA, ar_SA, ar_SD, ar_SO, ar_SS, ar_SY, ar_TD, ar_TN, ar_YE, as_, asa, ast, az, az_Cyrl, az_Latn, bas, be, bem, bez, bg, bm, bn, bn_IN, bo, bo_IN, br, brx, bs, bs_Cyrl, bs_Latn, ca, ca_AD, ca_ES_VALENCIA, ca_FR, ca_IT, ccp, ccp_IN, ce, ceb, cgg, chr, ckb, ckb_IR, cs, cu, cy, da, da_GL, dav, de, de_AT, de_BE, de_CH, de_IT, de_LI, de_LU, dje, dsb, dua, dyo, dz, ebu, ee, ee_TG, el, el_CY, en, en_001, en_150, en_AE, en_AG, en_AI, en_AS, en_AT, en_AU, en_BB, en_BE, en_BI, en_BM, en_BS, en_BW, en_BZ, en_CA, en_CC, en_CH, en_CK, en_CM, en_CX, en_CY, en_DE, en_DG, en_DK, en_DM, en_ER, en_FI, en_FJ, en_FK, en_FM, en_GB, en_GD, en_GG, en_GH, en_GI, en_GM, en_GU, en_GY, en_HK, en_IE, en_IL, en_IM, en_IN, en_IO, en_JE, en_JM, en_KE, en_KI, en_KN, en_KY, en_LC, en_LR, en_LS, en_MG, en_MH, en_MO, en_MP, en_MS, en_MT, en_MU, en_MW, en_MY, en_NA, en_NF, en_NG, en_NL, en_NR, en_NU, en_NZ, en_PG, en_PH, en_PK, en_PN, en_PR, en_PW, en_RW, en_SB, en_SC, en_SD, en_SE, en_SG, en_SH, en_SI, en_SL, en_SS, en_SX, en_SZ, en_TC, en_TK, en_TO, en_TT, en_TV, en_TZ, en_UG, en_UM, en_US_POSIX, en_VC, en_VG, en_VI, en_VU, en_WS, en_ZA, en_ZM, en_ZW, eo, es, es_419, es_AR, es_BO, es_BR, es_BZ, es_CL, es_CO, es_CR, es_CU, es_DO, es_EA, es_EC, es_GQ, es_GT, es_HN, es_IC, es_MX, es_NI, es_PA, es_PE, es_PH, es_PR, es_PY, es_SV, es_US, es_UY, es_VE, et, eu, ewo, fa, fa_AF, ff, ff_Latn, ff_Latn_BF, ff_Latn_CM, ff_Latn_GH, ff_Latn_GM, ff_Latn_GN, ff_Latn_GW, ff_Latn_LR, ff_Latn_MR, ff_Latn_NE, ff_Latn_NG, ff_Latn_SL, fi, fil, fo, fo_DK, fr, fr_BE, fr_BF, fr_BI, fr_BJ, fr_BL, fr_CA, fr_CD, fr_CF, fr_CG, fr_CH, fr_CI, fr_CM, fr_DJ, fr_DZ, fr_GA, fr_GF, fr_GN, fr_GP, fr_GQ, fr_HT, fr_KM, fr_LU, fr_MA, fr_MC, fr_MF, fr_MG, fr_ML, fr_MQ, fr_MR, fr_MU, fr_NC, fr_NE, fr_PF, fr_PM, fr_RE, fr_RW, fr_SC, fr_SN, fr_SY, fr_TD, fr_TG, fr_TN, fr_VU, fr_WF, fr_YT, fur, fy, ga, ga_GB, gd, gl, gsw, gsw_FR, gsw_LI, gu, guz, gv, ha, ha_GH, ha_NE, haw, he, hi, hr, hr_BA, hsb, hu, hy, ia, id, ig, ii, is, it, it_CH, it_SM, it_VA, ja, jgo, jmc, jv, ka, kab, kam, kde, kea, khq, ki, kk, kkj, kl, kln, km, kn, ko, ko_KP, kok, ks, ksb, ksf, ksh, ku, kw, ky, lag, lb, lg, lkt, ln, ln_AO, ln_CF, ln_CG, lo, lrc, lrc_IQ, lt, lu, luo, luy, lv, mas, mas_TZ, mer, mfe, mg, mgh, mgo, mi, mk, ml, mn, mr, ms, ms_BN, ms_SG, mt, mua, my, mzn, naq, nb, nb_SJ, nd, nds, nds_NL, ne, ne_IN, nl, nl_AW, nl_BE, nl_BQ, nl_CW, nl_SR, nl_SX, nmg, nn, nnh, nus, nyn, om, om_KE, or, os, os_RU, pa, pa_Arab, pa_Guru, pl, prg, ps, ps_PK, pt, pt_AO, pt_CH, pt_CV, pt_GQ, pt_GW, pt_LU, pt_MO, pt_MZ, pt_PT, pt_ST, pt_TL, qu, qu_BO, qu_EC, rm, rn, ro, ro_MD, rof, root, ru, ru_BY, ru_KG, ru_KZ, ru_MD, ru_UA, rw, rwk, sah, saq, sbp, sd, se, se_FI, se_SE, seh, ses, sg, shi, shi_Latn, shi_Tfng, si, sk, sl, smn, sn, so, so_DJ, so_ET, so_KE, sq, sq_MK, sq_XK, sr, sr_Cyrl, sr_Cyrl_BA, sr_Cyrl_ME, sr_Cyrl_XK, sr_Latn, sr_Latn_BA, sr_Latn_ME, sr_Latn_XK, sv, sv_AX, sv_FI, sw, sw_CD, sw_KE, sw_UG, ta, ta_LK, ta_MY, ta_SG, te, teo, teo_KE, tg, th, ti, ti_ER, tk, to, tr, tr_CY, tt, twq, tzm, ug, uk, ur, ur_IN, uz, uz_Arab, uz_Cyrl, uz_Latn, vai, vai_Latn, vai_Vaii, vi, vo, vun, wae, wo, xh, xog, yav, yi, yo, yo_BJ, yue, yue_Hans, yue_Hant, zgh, zh, zh_Hans, zh_Hans_HK, zh_Hans_MO, zh_Hans_SG, zh_Hant, zh_Hant_HK, zh_Hant_MO, zu,
}
Expand description

A key type. Represents formats from the Unicode Consortium’s Common Locale Data Repository (CLDR). Implements Format.

Example

use num_format::{Buffer, Locale};

fn main() {
    // Using the French format from the Unicode Common Locale Data Repository...
    let mut buf = Buffer::new();
    buf.write_formatted(&(-1000000), &Locale::fr);
    assert_eq!("-1\u{202f}000\u{202f}000", buf.as_str());

    // Note:
    // U+202F is the "NARROW NO-BREAK SPACE" code point.
    // When displayed to the screen, it looks like a space.
}

Variants§

§

af

§

af_NA

§

agq

§

ak

§

am

§

ar

§

ar_AE

§

ar_BH

§

ar_DJ

§

ar_DZ

§

ar_EG

§

ar_EH

§

ar_ER

§

ar_IL

§

ar_IQ

§

ar_JO

§

ar_KM

§

ar_KW

§

ar_LB

§

ar_LY

§

ar_MA

§

ar_MR

§

ar_OM

§

ar_PS

§

ar_QA

§

ar_SA

§

ar_SD

§

ar_SO

§

ar_SS

§

ar_SY

§

ar_TD

§

ar_TN

§

ar_YE

§

as_

§

asa

§

ast

§

az

§

az_Cyrl

§

az_Latn

§

bas

§

be

§

bem

§

bez

§

bg

§

bm

§

bn

§

bn_IN

§

bo

§

bo_IN

§

br

§

brx

§

bs

§

bs_Cyrl

§

bs_Latn

§

ca

§

ca_AD

§

ca_ES_VALENCIA

§

ca_FR

§

ca_IT

§

ccp

§

ccp_IN

§

ce

§

ceb

§

cgg

§

chr

§

ckb

§

ckb_IR

§

cs

§

cu

§

cy

§

da

§

da_GL

§

dav

§

de

§

de_AT

§

de_BE

§

de_CH

§

de_IT

§

de_LI

§

de_LU

§

dje

§

dsb

§

dua

§

dyo

§

dz

§

ebu

§

ee

§

ee_TG

§

el

§

el_CY

§

en

§

en_001

§

en_150

§

en_AE

§

en_AG

§

en_AI

§

en_AS

§

en_AT

§

en_AU

§

en_BB

§

en_BE

§

en_BI

§

en_BM

§

en_BS

§

en_BW

§

en_BZ

§

en_CA

§

en_CC

§

en_CH

§

en_CK

§

en_CM

§

en_CX

§

en_CY

§

en_DE

§

en_DG

§

en_DK

§

en_DM

§

en_ER

§

en_FI

§

en_FJ

§

en_FK

§

en_FM

§

en_GB

§

en_GD

§

en_GG

§

en_GH

§

en_GI

§

en_GM

§

en_GU

§

en_GY

§

en_HK

§

en_IE

§

en_IL

§

en_IM

§

en_IN

§

en_IO

§

en_JE

§

en_JM

§

en_KE

§

en_KI

§

en_KN

§

en_KY

§

en_LC

§

en_LR

§

en_LS

§

en_MG

§

en_MH

§

en_MO

§

en_MP

§

en_MS

§

en_MT

§

en_MU

§

en_MW

§

en_MY

§

en_NA

§

en_NF

§

en_NG

§

en_NL

§

en_NR

§

en_NU

§

en_NZ

§

en_PG

§

en_PH

§

en_PK

§

en_PN

§

en_PR

§

en_PW

§

en_RW

§

en_SB

§

en_SC

§

en_SD

§

en_SE

§

en_SG

§

en_SH

§

en_SI

§

en_SL

§

en_SS

§

en_SX

§

en_SZ

§

en_TC

§

en_TK

§

en_TO

§

en_TT

§

en_TV

§

en_TZ

§

en_UG

§

en_UM

§

en_US_POSIX

§

en_VC

§

en_VG

§

en_VI

§

en_VU

§

en_WS

§

en_ZA

§

en_ZM

§

en_ZW

§

eo

§

es

§

es_419

§

es_AR

§

es_BO

§

es_BR

§

es_BZ

§

es_CL

§

es_CO

§

es_CR

§

es_CU

§

es_DO

§

es_EA

§

es_EC

§

es_GQ

§

es_GT

§

es_HN

§

es_IC

§

es_MX

§

es_NI

§

es_PA

§

es_PE

§

es_PH

§

es_PR

§

es_PY

§

es_SV

§

es_US

§

es_UY

§

es_VE

§

et

§

eu

§

ewo

§

fa

§

fa_AF

§

ff

§

ff_Latn

§

ff_Latn_BF

§

ff_Latn_CM

§

ff_Latn_GH

§

ff_Latn_GM

§

ff_Latn_GN

§

ff_Latn_GW

§

ff_Latn_LR

§

ff_Latn_MR

§

ff_Latn_NE

§

ff_Latn_NG

§

ff_Latn_SL

§

fi

§

fil

§

fo

§

fo_DK

§

fr

§

fr_BE

§

fr_BF

§

fr_BI

§

fr_BJ

§

fr_BL

§

fr_CA

§

fr_CD

§

fr_CF

§

fr_CG

§

fr_CH

§

fr_CI

§

fr_CM

§

fr_DJ

§

fr_DZ

§

fr_GA

§

fr_GF

§

fr_GN

§

fr_GP

§

fr_GQ

§

fr_HT

§

fr_KM

§

fr_LU

§

fr_MA

§

fr_MC

§

fr_MF

§

fr_MG

§

fr_ML

§

fr_MQ

§

fr_MR

§

fr_MU

§

fr_NC

§

fr_NE

§

fr_PF

§

fr_PM

§

fr_RE

§

fr_RW

§

fr_SC

§

fr_SN

§

fr_SY

§

fr_TD

§

fr_TG

§

fr_TN

§

fr_VU

§

fr_WF

§

fr_YT

§

fur

§

fy

§

ga

§

ga_GB

§

gd

§

gl

§

gsw

§

gsw_FR

§

gsw_LI

§

gu

§

guz

§

gv

§

ha

§

ha_GH

§

ha_NE

§

haw

§

he

§

hi

§

hr

§

hr_BA

§

hsb

§

hu

§

hy

§

ia

§

id

§

ig

§

ii

§

is

§

it

§

it_CH

§

it_SM

§

it_VA

§

ja

§

jgo

§

jmc

§

jv

§

ka

§

kab

§

kam

§

kde

§

kea

§

khq

§

ki

§

kk

§

kkj

§

kl

§

kln

§

km

§

kn

§

ko

§

ko_KP

§

kok

§

ks

§

ksb

§

ksf

§

ksh

§

ku

§

kw

§

ky

§

lag

§

lb

§

lg

§

lkt

§

ln

§

ln_AO

§

ln_CF

§

ln_CG

§

lo

§

lrc

§

lrc_IQ

§

lt

§

lu

§

luo

§

luy

§

lv

§

mas

§

mas_TZ

§

mer

§

mfe

§

mg

§

mgh

§

mgo

§

mi

§

mk

§

ml

§

mn

§

mr

§

ms

§

ms_BN

§

ms_SG

§

mt

§

mua

§

my

§

mzn

§

naq

§

nb

§

nb_SJ

§

nd

§

nds

§

nds_NL

§

ne

§

ne_IN

§

nl

§

nl_AW

§

nl_BE

§

nl_BQ

§

nl_CW

§

nl_SR

§

nl_SX

§

nmg

§

nn

§

nnh

§

nus

§

nyn

§

om

§

om_KE

§

or

§

os

§

os_RU

§

pa

§

pa_Arab

§

pa_Guru

§

pl

§

prg

§

ps

§

ps_PK

§

pt

§

pt_AO

§

pt_CH

§

pt_CV

§

pt_GQ

§

pt_GW

§

pt_LU

§

pt_MO

§

pt_MZ

§

pt_PT

§

pt_ST

§

pt_TL

§

qu

§

qu_BO

§

qu_EC

§

rm

§

rn

§

ro

§

ro_MD

§

rof

§

root

§

ru

§

ru_BY

§

ru_KG

§

ru_KZ

§

ru_MD

§

ru_UA

§

rw

§

rwk

§

sah

§

saq

§

sbp

§

sd

§

se

§

se_FI

§

se_SE

§

seh

§

ses

§

sg

§

shi

§

shi_Latn

§

shi_Tfng

§

si

§

sk

§

sl

§

smn

§

sn

§

so

§

so_DJ

§

so_ET

§

so_KE

§

sq

§

sq_MK

§

sq_XK

§

sr

§

sr_Cyrl

§

sr_Cyrl_BA

§

sr_Cyrl_ME

§

sr_Cyrl_XK

§

sr_Latn

§

sr_Latn_BA

§

sr_Latn_ME

§

sr_Latn_XK

§

sv

§

sv_AX

§

sv_FI

§

sw

§

sw_CD

§

sw_KE

§

sw_UG

§

ta

§

ta_LK

§

ta_MY

§

ta_SG

§

te

§

teo

§

teo_KE

§

tg

§

th

§

ti

§

ti_ER

§

tk

§

to

§

tr

§

tr_CY

§

tt

§

twq

§

tzm

§

ug

§

uk

§

ur

§

ur_IN

§

uz

§

uz_Arab

§

uz_Cyrl

§

uz_Latn

§

vai

§

vai_Latn

§

vai_Vaii

§

vi

§

vo

§

vun

§

wae

§

wo

§

xh

§

xog

§

yav

§

yi

§

yo

§

yo_BJ

§

yue

§

yue_Hans

§

yue_Hant

§

zgh

§

zh

§

zh_Hans

§

zh_Hans_HK

§

zh_Hans_MO

§

zh_Hans_SG

§

zh_Hant

§

zh_Hant_HK

§

zh_Hant_MO

§

zu

Implementations§

Constructs a Locale from its name. For a list of available names, see available_names.

Errors

Returns an error if the name provided cannot be parsed into a Locale.

Returns a static slice of all available names.

Returns the locale’s decimal representation.

Returns the locale’s Grouping.

Returns the locale’s infinity representation.

Returns the locale’s minus sign representation.

Returns the locale’s name.

Returns the locale’s NaN representation.

Returns the locale’s plus sign representation.

Returns the locale’s separator representation, if any.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the string representation of a decimal point.
Returns the Grouping to use for separating digits. (see Grouping) Read more
Returns the string representation of an infinity symbol.
Returns the string representation of a minus sign.
Returns the string representation of NaN.
Returns the string representation of a plus sign.
Returns the string representation of a thousands separator.
Converts to this type from the input type.
Converts to this type from the input type.

Same as from_name.

The associated error which can be returned from parsing.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.