Struct format_num_pattern::NumberSymbols
source · pub struct NumberSymbols {
pub decimal_sep: char,
pub decimal_grp: Option<char>,
pub negative_sym: char,
pub positive_sym: char,
pub exponent_upper_sym: char,
pub exponent_lower_sym: char,
pub currency_sym: CurrencySym,
}Expand description
Symbols for number formatting.
Fields§
§decimal_sep: charDecimal separator
decimal_grp: Option<char>Decimal grouping
negative_sym: charMinus sign
positive_sym: charPlus sign
exponent_upper_sym: charExponent
exponent_lower_sym: charExponent
currency_sym: CurrencySymCurrency
Implementations§
source§impl NumberSymbols
impl NumberSymbols
pub const fn new() -> Self
sourcepub fn numeric(locale: Locale) -> Self
pub fn numeric(locale: Locale) -> Self
Uses the locale information provided by pure_rust_locales.
This function sets
- decimal_sep to LC_NUMERIC::DECIMAL_POINT,
- decimal_grp to LC_NUMERIC::THOUSANDS_SEP Fills the rest with defaults.
sourcepub fn monetary(locale: Locale) -> Self
pub fn monetary(locale: Locale) -> Self
Uses the locale information provided by pure_rust_locales.
This function sets
- decimal_sep to LC_MONETARY::MON_DECIMAL_POINT,
- decimal_grp to LC_MONETARY::MON_THOUSANDS_SEP
- negative_sym to LC_MONETARY::NEGATIVE_SIGN
- positive_sym to LC_MONETARY::POSITIVE_SIGN
- currency_sym to LC_MONETARY::CURRENCY_SYMBOL Fills the rest with defaults.
sourcepub fn int_monetary(locale: Locale) -> Self
pub fn int_monetary(locale: Locale) -> Self
Uses the locale information provided by pure_rust_locales.
This function sets
- decimal_sep to LC_MONETARY::MON_DECIMAL_POINT,
- decimal_grp to LC_MONETARY::MON_THOUSANDS_SEP
- negative_sym to LC_MONETARY::NEGATIVE_SIGN
- positive_sym to LC_MONETARY::POSITIVE_SIGN
- currency_sym to LC_MONETARY::INT_CURR_SYMBOL Fills the rest with defaults.
Trait Implementations§
source§impl Clone for NumberSymbols
impl Clone for NumberSymbols
source§fn clone(&self) -> NumberSymbols
fn clone(&self) -> NumberSymbols
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 NumberSymbols
impl Debug for NumberSymbols
source§impl Default for NumberSymbols
impl Default for NumberSymbols
source§impl PartialEq for NumberSymbols
impl PartialEq for NumberSymbols
source§fn eq(&self, other: &NumberSymbols) -> bool
fn eq(&self, other: &NumberSymbols) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for NumberSymbols
impl Eq for NumberSymbols
impl StructuralPartialEq for NumberSymbols
Auto Trait Implementations§
impl Freeze for NumberSymbols
impl RefUnwindSafe for NumberSymbols
impl Send for NumberSymbols
impl Sync for NumberSymbols
impl Unpin for NumberSymbols
impl UnwindSafe for NumberSymbols
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