#[non_exhaustive]pub enum NumberStyle<'a> {
Decimal,
Percent,
Currency {
code: &'a str,
display: CurrencyDisplay,
accounting: bool,
own_digits: bool,
},
Unit {
unit: &'a str,
display: UnitDisplay,
},
}Expand description
How a NumberRequest is shown.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Decimal
A plain number.
Percent
:percent: the value × 100, with the locale’s percent pattern.
Currency
:currency.
Fields
§
display: CurrencyDisplaycurrencyDisplay.
§
own_digits: boolfractionDigits unset or auto: the currency’s own fraction
digits, the formatter’s — the request then has no fraction digits
(DigitOptions::fraction None).
Unit
:unit.
Trait Implementations§
Source§impl<'a> Clone for NumberStyle<'a>
impl<'a> Clone for NumberStyle<'a>
impl<'a> Copy for NumberStyle<'a>
Source§impl<'a> Debug for NumberStyle<'a>
impl<'a> Debug for NumberStyle<'a>
impl<'a> Eq for NumberStyle<'a>
Source§impl<'a> Hash for NumberStyle<'a>
impl<'a> Hash for NumberStyle<'a>
Source§impl<'a> PartialEq for NumberStyle<'a>
impl<'a> PartialEq for NumberStyle<'a>
impl<'a> StructuralPartialEq for NumberStyle<'a>
Auto Trait Implementations§
impl<'a> Freeze for NumberStyle<'a>
impl<'a> RefUnwindSafe for NumberStyle<'a>
impl<'a> Send for NumberStyle<'a>
impl<'a> Sync for NumberStyle<'a>
impl<'a> Unpin for NumberStyle<'a>
impl<'a> UnsafeUnpin for NumberStyle<'a>
impl<'a> UnwindSafe for NumberStyle<'a>
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