Enum num_format::Locale [−][src]
pub enum Locale {
Show 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,
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_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,
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o,
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,
}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
Implementations
impl Locale[src]
impl Locale[src]pub fn from_name<S>(name: S) -> Result<Locale, Error> where
S: AsRef<str>, [src]
S: AsRef<str>,
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.
pub fn available_names() -> &'static [&'static str][src]
Returns a static slice of all available names.
pub fn decimal(&self) -> &'static str[src]
Returns the locale’s decimal representation.
pub fn grouping(&self) -> Grouping[src]
Returns the locale’s Grouping.
pub fn infinity(&self) -> &'static str[src]
Returns the locale’s infinity representation.
pub fn minus_sign(&self) -> &'static str[src]
Returns the locale’s minus sign representation.
pub fn name(&self) -> &'static str[src]
Returns the locale’s name.
pub fn nan(&self) -> &'static str[src]
Returns the locale’s NaN representation.
pub fn plus_sign(&self) -> &'static str[src]
Returns the locale’s plus sign representation.
pub fn separator(&self) -> &'static str[src]
Returns the locale’s separator representation, if any.
Trait Implementations
impl Format for Locale[src]
impl Format for Locale[src]fn decimal(&self) -> DecimalStr<'_>[src]
fn grouping(&self) -> Grouping[src]
fn infinity(&self) -> InfinityStr<'_>[src]
fn minus_sign(&self) -> MinusSignStr<'_>[src]
fn nan(&self) -> NanStr<'_>[src]
fn plus_sign(&self) -> PlusSignStr<'_>[src]
fn separator(&self) -> SeparatorStr<'_>[src]
impl PartialOrd<Locale> for Locale[src]
impl PartialOrd<Locale> for Locale[src]