pub struct NumberFormatInfo { /* private fields */ }Expand description
Culture-specific information for formatting and parsing numbers.
Used as Rc<NumberFormatInfo> where the managed runtime passes the
object around; like every reference type without value equality it
compares by identity.
Implementations§
Source§impl NumberFormatInfo
impl NumberFormatInfo
Sourcepub fn currency_decimal_separator(&self) -> &str
pub fn currency_decimal_separator(&self) -> &str
The decimal separator of currency values.
Sourcepub fn set_currency_decimal_separator(&mut self, value: impl Into<String>)
pub fn set_currency_decimal_separator(&mut self, value: impl Into<String>)
The decimal separator of currency values.
Sourcepub fn with_currency_decimal_separator(self, value: impl Into<String>) -> Self
pub fn with_currency_decimal_separator(self, value: impl Into<String>) -> Self
The decimal separator of currency values.
Sourcepub fn currency_group_separator(&self) -> &str
pub fn currency_group_separator(&self) -> &str
The separator of the digit groups of currency values.
Sourcepub fn set_currency_group_separator(&mut self, value: impl Into<String>)
pub fn set_currency_group_separator(&mut self, value: impl Into<String>)
The separator of the digit groups of currency values.
Sourcepub fn with_currency_group_separator(self, value: impl Into<String>) -> Self
pub fn with_currency_group_separator(self, value: impl Into<String>) -> Self
The separator of the digit groups of currency values.
Sourcepub fn currency_symbol(&self) -> &str
pub fn currency_symbol(&self) -> &str
The currency symbol.
Sourcepub fn set_currency_symbol(&mut self, value: impl Into<String>)
pub fn set_currency_symbol(&mut self, value: impl Into<String>)
The currency symbol.
Sourcepub fn with_currency_symbol(self, value: impl Into<String>) -> Self
pub fn with_currency_symbol(self, value: impl Into<String>) -> Self
The currency symbol.
Sourcepub fn nan_symbol(&self) -> &str
pub fn nan_symbol(&self) -> &str
The text of not-a-number.
Sourcepub fn set_nan_symbol(&mut self, value: impl Into<String>)
pub fn set_nan_symbol(&mut self, value: impl Into<String>)
The text of not-a-number.
Sourcepub fn with_nan_symbol(self, value: impl Into<String>) -> Self
pub fn with_nan_symbol(self, value: impl Into<String>) -> Self
The text of not-a-number.
Sourcepub fn negative_infinity_symbol(&self) -> &str
pub fn negative_infinity_symbol(&self) -> &str
The text of negative infinity.
Sourcepub fn set_negative_infinity_symbol(&mut self, value: impl Into<String>)
pub fn set_negative_infinity_symbol(&mut self, value: impl Into<String>)
The text of negative infinity.
Sourcepub fn with_negative_infinity_symbol(self, value: impl Into<String>) -> Self
pub fn with_negative_infinity_symbol(self, value: impl Into<String>) -> Self
The text of negative infinity.
Sourcepub fn negative_sign(&self) -> &str
pub fn negative_sign(&self) -> &str
The sign of negative numbers.
Sourcepub fn set_negative_sign(&mut self, value: impl Into<String>)
pub fn set_negative_sign(&mut self, value: impl Into<String>)
The sign of negative numbers.
Sourcepub fn with_negative_sign(self, value: impl Into<String>) -> Self
pub fn with_negative_sign(self, value: impl Into<String>) -> Self
The sign of negative numbers.
Sourcepub fn number_decimal_separator(&self) -> &str
pub fn number_decimal_separator(&self) -> &str
The decimal separator of numbers.
Sourcepub fn set_number_decimal_separator(&mut self, value: impl Into<String>)
pub fn set_number_decimal_separator(&mut self, value: impl Into<String>)
The decimal separator of numbers.
Sourcepub fn with_number_decimal_separator(self, value: impl Into<String>) -> Self
pub fn with_number_decimal_separator(self, value: impl Into<String>) -> Self
The decimal separator of numbers.
Sourcepub fn number_group_separator(&self) -> &str
pub fn number_group_separator(&self) -> &str
The separator of the digit groups of numbers.
Sourcepub fn set_number_group_separator(&mut self, value: impl Into<String>)
pub fn set_number_group_separator(&mut self, value: impl Into<String>)
The separator of the digit groups of numbers.
Sourcepub fn with_number_group_separator(self, value: impl Into<String>) -> Self
pub fn with_number_group_separator(self, value: impl Into<String>) -> Self
The separator of the digit groups of numbers.
Sourcepub fn percent_decimal_separator(&self) -> &str
pub fn percent_decimal_separator(&self) -> &str
The decimal separator of percent values.
Sourcepub fn set_percent_decimal_separator(&mut self, value: impl Into<String>)
pub fn set_percent_decimal_separator(&mut self, value: impl Into<String>)
The decimal separator of percent values.
Sourcepub fn with_percent_decimal_separator(self, value: impl Into<String>) -> Self
pub fn with_percent_decimal_separator(self, value: impl Into<String>) -> Self
The decimal separator of percent values.
Sourcepub fn percent_group_separator(&self) -> &str
pub fn percent_group_separator(&self) -> &str
The separator of the digit groups of percent values.
Sourcepub fn set_percent_group_separator(&mut self, value: impl Into<String>)
pub fn set_percent_group_separator(&mut self, value: impl Into<String>)
The separator of the digit groups of percent values.
Sourcepub fn with_percent_group_separator(self, value: impl Into<String>) -> Self
pub fn with_percent_group_separator(self, value: impl Into<String>) -> Self
The separator of the digit groups of percent values.
Sourcepub fn percent_symbol(&self) -> &str
pub fn percent_symbol(&self) -> &str
The percent symbol.
Sourcepub fn set_percent_symbol(&mut self, value: impl Into<String>)
pub fn set_percent_symbol(&mut self, value: impl Into<String>)
The percent symbol.
Sourcepub fn with_percent_symbol(self, value: impl Into<String>) -> Self
pub fn with_percent_symbol(self, value: impl Into<String>) -> Self
The percent symbol.
Sourcepub fn per_mille_symbol(&self) -> &str
pub fn per_mille_symbol(&self) -> &str
The per mille symbol.
Sourcepub fn set_per_mille_symbol(&mut self, value: impl Into<String>)
pub fn set_per_mille_symbol(&mut self, value: impl Into<String>)
The per mille symbol.
Sourcepub fn with_per_mille_symbol(self, value: impl Into<String>) -> Self
pub fn with_per_mille_symbol(self, value: impl Into<String>) -> Self
The per mille symbol.
Sourcepub fn positive_infinity_symbol(&self) -> &str
pub fn positive_infinity_symbol(&self) -> &str
The text of positive infinity.
Sourcepub fn set_positive_infinity_symbol(&mut self, value: impl Into<String>)
pub fn set_positive_infinity_symbol(&mut self, value: impl Into<String>)
The text of positive infinity.
Sourcepub fn with_positive_infinity_symbol(self, value: impl Into<String>) -> Self
pub fn with_positive_infinity_symbol(self, value: impl Into<String>) -> Self
The text of positive infinity.
Sourcepub fn positive_sign(&self) -> &str
pub fn positive_sign(&self) -> &str
The sign of positive numbers.
Sourcepub fn set_positive_sign(&mut self, value: impl Into<String>)
pub fn set_positive_sign(&mut self, value: impl Into<String>)
The sign of positive numbers.
Sourcepub fn with_positive_sign(self, value: impl Into<String>) -> Self
pub fn with_positive_sign(self, value: impl Into<String>) -> Self
The sign of positive numbers.
Source§impl NumberFormatInfo
impl NumberFormatInfo
Sourcepub fn currency_decimal_digits(&self) -> i32
pub fn currency_decimal_digits(&self) -> i32
The number of decimal places of currency values.
Sourcepub fn set_currency_decimal_digits(&self, value: i32)
pub fn set_currency_decimal_digits(&self, value: i32)
The number of decimal places of currency values.
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_currency_decimal_digits(self, value: i32) -> Self
pub fn with_currency_decimal_digits(self, value: i32) -> Self
The number of decimal places of currency values.
Panics when the value is out of range.
Sourcepub fn currency_negative_pattern(&self) -> i32
pub fn currency_negative_pattern(&self) -> i32
The pattern of negative currency values (0 is ($n), 1 is -$n).
Sourcepub fn set_currency_negative_pattern(&self, value: i32)
pub fn set_currency_negative_pattern(&self, value: i32)
The pattern of negative currency values (0 is ($n), 1 is -$n).
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_currency_negative_pattern(self, value: i32) -> Self
pub fn with_currency_negative_pattern(self, value: i32) -> Self
The pattern of negative currency values (0 is ($n), 1 is -$n).
Panics when the value is out of range.
Sourcepub fn currency_positive_pattern(&self) -> i32
pub fn currency_positive_pattern(&self) -> i32
The pattern of positive currency values (0 is $n, 1 is n$, 2 is
$ n, 3 is n $).
Sourcepub fn set_currency_positive_pattern(&self, value: i32)
pub fn set_currency_positive_pattern(&self, value: i32)
The pattern of positive currency values (0 is $n, 1 is n$, 2 is
$ n, 3 is n $).
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_currency_positive_pattern(self, value: i32) -> Self
pub fn with_currency_positive_pattern(self, value: i32) -> Self
The pattern of positive currency values (0 is $n, 1 is n$, 2 is
$ n, 3 is n $).
Panics when the value is out of range.
Sourcepub fn number_decimal_digits(&self) -> i32
pub fn number_decimal_digits(&self) -> i32
The number of decimal places of numbers.
Sourcepub fn set_number_decimal_digits(&self, value: i32)
pub fn set_number_decimal_digits(&self, value: i32)
The number of decimal places of numbers.
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_number_decimal_digits(self, value: i32) -> Self
pub fn with_number_decimal_digits(self, value: i32) -> Self
The number of decimal places of numbers.
Panics when the value is out of range.
Sourcepub fn number_negative_pattern(&self) -> i32
pub fn number_negative_pattern(&self) -> i32
The pattern of negative numbers (0 is (n), 1 is -n, 2 is - n,
3 is n-, 4 is n -).
Sourcepub fn set_number_negative_pattern(&self, value: i32)
pub fn set_number_negative_pattern(&self, value: i32)
The pattern of negative numbers (0 is (n), 1 is -n, 2 is - n,
3 is n-, 4 is n -).
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_number_negative_pattern(self, value: i32) -> Self
pub fn with_number_negative_pattern(self, value: i32) -> Self
The pattern of negative numbers (0 is (n), 1 is -n, 2 is - n,
3 is n-, 4 is n -).
Panics when the value is out of range.
Sourcepub fn percent_decimal_digits(&self) -> i32
pub fn percent_decimal_digits(&self) -> i32
The number of decimal places of percent values.
Sourcepub fn set_percent_decimal_digits(&self, value: i32)
pub fn set_percent_decimal_digits(&self, value: i32)
The number of decimal places of percent values.
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_percent_decimal_digits(self, value: i32) -> Self
pub fn with_percent_decimal_digits(self, value: i32) -> Self
The number of decimal places of percent values.
Panics when the value is out of range.
Sourcepub fn percent_negative_pattern(&self) -> i32
pub fn percent_negative_pattern(&self) -> i32
The pattern of negative percent values (0 is -n %, 1 is -n%).
Sourcepub fn set_percent_negative_pattern(&self, value: i32)
pub fn set_percent_negative_pattern(&self, value: i32)
The pattern of negative percent values (0 is -n %, 1 is -n%).
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_percent_negative_pattern(self, value: i32) -> Self
pub fn with_percent_negative_pattern(self, value: i32) -> Self
The pattern of negative percent values (0 is -n %, 1 is -n%).
Panics when the value is out of range.
Sourcepub fn percent_positive_pattern(&self) -> i32
pub fn percent_positive_pattern(&self) -> i32
The pattern of positive percent values (0 is n %, 1 is n%, 2 is
%n, 3 is % n).
Sourcepub fn set_percent_positive_pattern(&self, value: i32)
pub fn set_percent_positive_pattern(&self, value: i32)
The pattern of positive percent values (0 is n %, 1 is n%, 2 is
%n, 3 is % n).
Panics when the value is out of range. Takes a shared
reference, as the instance is shared through Rc where the
original passes the object around (markup sets the property
on the instance it created).
Sourcepub fn with_percent_positive_pattern(self, value: i32) -> Self
pub fn with_percent_positive_pattern(self, value: i32) -> Self
The pattern of positive percent values (0 is n %, 1 is n%, 2 is
%n, 3 is % n).
Panics when the value is out of range.
Source§impl NumberFormatInfo
impl NumberFormatInfo
Sourcepub fn currency_group_sizes(&self) -> &[i32]
pub fn currency_group_sizes(&self) -> &[i32]
The number of digits in each group of currency values, from the decimal separator leftwards; the last size repeats.
Sourcepub fn set_currency_group_sizes(&mut self, value: &[i32])
pub fn set_currency_group_sizes(&mut self, value: &[i32])
The number of digits in each group of currency values, from the decimal separator leftwards; the last size repeats.
Panics when a size is not between 1 and 9, except the last, which may be 0 (the remaining digits are not grouped).
Sourcepub fn with_currency_group_sizes(self, value: &[i32]) -> Self
pub fn with_currency_group_sizes(self, value: &[i32]) -> Self
The number of digits in each group of currency values, from the decimal separator leftwards; the last size repeats.
Panics when a size is not valid.
Sourcepub fn number_group_sizes(&self) -> &[i32]
pub fn number_group_sizes(&self) -> &[i32]
The number of digits in each group of numbers, from the decimal separator leftwards; the last size repeats.
Sourcepub fn set_number_group_sizes(&mut self, value: &[i32])
pub fn set_number_group_sizes(&mut self, value: &[i32])
The number of digits in each group of numbers, from the decimal separator leftwards; the last size repeats.
Panics when a size is not between 1 and 9, except the last, which may be 0 (the remaining digits are not grouped).
Sourcepub fn with_number_group_sizes(self, value: &[i32]) -> Self
pub fn with_number_group_sizes(self, value: &[i32]) -> Self
The number of digits in each group of numbers, from the decimal separator leftwards; the last size repeats.
Panics when a size is not valid.
Sourcepub fn percent_group_sizes(&self) -> &[i32]
pub fn percent_group_sizes(&self) -> &[i32]
The number of digits in each group of percent values, from the decimal separator leftwards; the last size repeats.
Sourcepub fn set_percent_group_sizes(&mut self, value: &[i32])
pub fn set_percent_group_sizes(&mut self, value: &[i32])
The number of digits in each group of percent values, from the decimal separator leftwards; the last size repeats.
Panics when a size is not between 1 and 9, except the last, which may be 0 (the remaining digits are not grouped).
Sourcepub fn with_percent_group_sizes(self, value: &[i32]) -> Self
pub fn with_percent_group_sizes(self, value: &[i32]) -> Self
The number of digits in each group of percent values, from the decimal separator leftwards; the last size repeats.
Panics when a size is not valid.
Source§impl NumberFormatInfo
impl NumberFormatInfo
Sourcepub fn new() -> NumberFormatInfo
pub fn new() -> NumberFormatInfo
Format information with the values of the invariant culture (C#
new NumberFormatInfo()).
Sourcepub fn invariant_info() -> Rc<NumberFormatInfo>
pub fn invariant_info() -> Rc<NumberFormatInfo>
The format information of the invariant culture.
Sourcepub fn current_info() -> Rc<NumberFormatInfo>
pub fn current_info() -> Rc<NumberFormatInfo>
The format information of the current culture.
Sourcepub fn get_instance(
provider: Option<&Rc<NumberFormatInfo>>,
) -> Rc<NumberFormatInfo>
pub fn get_instance( provider: Option<&Rc<NumberFormatInfo>>, ) -> Rc<NumberFormatInfo>
The given format information, or that of the current culture when
there is none (C# GetInstance(IFormatProvider)).
Trait Implementations§
Source§impl Clone for NumberFormatInfo
impl Clone for NumberFormatInfo
Source§impl Debug for NumberFormatInfo
impl Debug for NumberFormatInfo
Source§impl Default for NumberFormatInfo
impl Default for NumberFormatInfo
Source§impl MarkupTyped for NumberFormatInfo
impl MarkupTyped for NumberFormatInfo
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for NumberFormatInfo
impl !RefUnwindSafe for NumberFormatInfo
impl !Sync for NumberFormatInfo
impl Send for NumberFormatInfo
impl Unpin for NumberFormatInfo
impl UnsafeUnpin for NumberFormatInfo
impl UnwindSafe for NumberFormatInfo
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more