Skip to main content

NumberFormatInfo

Struct NumberFormatInfo 

Source
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

Source

pub fn currency_decimal_separator(&self) -> &str

The decimal separator of currency values.

Source

pub fn set_currency_decimal_separator(&mut self, value: impl Into<String>)

The decimal separator of currency values.

Source

pub fn with_currency_decimal_separator(self, value: impl Into<String>) -> Self

The decimal separator of currency values.

Source

pub fn currency_group_separator(&self) -> &str

The separator of the digit groups of currency values.

Source

pub fn set_currency_group_separator(&mut self, value: impl Into<String>)

The separator of the digit groups of currency values.

Source

pub fn with_currency_group_separator(self, value: impl Into<String>) -> Self

The separator of the digit groups of currency values.

Source

pub fn currency_symbol(&self) -> &str

The currency symbol.

Source

pub fn set_currency_symbol(&mut self, value: impl Into<String>)

The currency symbol.

Source

pub fn with_currency_symbol(self, value: impl Into<String>) -> Self

The currency symbol.

Source

pub fn nan_symbol(&self) -> &str

The text of not-a-number.

Source

pub fn set_nan_symbol(&mut self, value: impl Into<String>)

The text of not-a-number.

Source

pub fn with_nan_symbol(self, value: impl Into<String>) -> Self

The text of not-a-number.

Source

pub fn negative_infinity_symbol(&self) -> &str

The text of negative infinity.

Source

pub fn set_negative_infinity_symbol(&mut self, value: impl Into<String>)

The text of negative infinity.

Source

pub fn with_negative_infinity_symbol(self, value: impl Into<String>) -> Self

The text of negative infinity.

Source

pub fn negative_sign(&self) -> &str

The sign of negative numbers.

Source

pub fn set_negative_sign(&mut self, value: impl Into<String>)

The sign of negative numbers.

Source

pub fn with_negative_sign(self, value: impl Into<String>) -> Self

The sign of negative numbers.

Source

pub fn number_decimal_separator(&self) -> &str

The decimal separator of numbers.

Source

pub fn set_number_decimal_separator(&mut self, value: impl Into<String>)

The decimal separator of numbers.

Source

pub fn with_number_decimal_separator(self, value: impl Into<String>) -> Self

The decimal separator of numbers.

Source

pub fn number_group_separator(&self) -> &str

The separator of the digit groups of numbers.

Source

pub fn set_number_group_separator(&mut self, value: impl Into<String>)

The separator of the digit groups of numbers.

Source

pub fn with_number_group_separator(self, value: impl Into<String>) -> Self

The separator of the digit groups of numbers.

Source

pub fn percent_decimal_separator(&self) -> &str

The decimal separator of percent values.

Source

pub fn set_percent_decimal_separator(&mut self, value: impl Into<String>)

The decimal separator of percent values.

Source

pub fn with_percent_decimal_separator(self, value: impl Into<String>) -> Self

The decimal separator of percent values.

Source

pub fn percent_group_separator(&self) -> &str

The separator of the digit groups of percent values.

Source

pub fn set_percent_group_separator(&mut self, value: impl Into<String>)

The separator of the digit groups of percent values.

Source

pub fn with_percent_group_separator(self, value: impl Into<String>) -> Self

The separator of the digit groups of percent values.

Source

pub fn percent_symbol(&self) -> &str

The percent symbol.

Source

pub fn set_percent_symbol(&mut self, value: impl Into<String>)

The percent symbol.

Source

pub fn with_percent_symbol(self, value: impl Into<String>) -> Self

The percent symbol.

Source

pub fn per_mille_symbol(&self) -> &str

The per mille symbol.

Source

pub fn set_per_mille_symbol(&mut self, value: impl Into<String>)

The per mille symbol.

Source

pub fn with_per_mille_symbol(self, value: impl Into<String>) -> Self

The per mille symbol.

Source

pub fn positive_infinity_symbol(&self) -> &str

The text of positive infinity.

Source

pub fn set_positive_infinity_symbol(&mut self, value: impl Into<String>)

The text of positive infinity.

Source

pub fn with_positive_infinity_symbol(self, value: impl Into<String>) -> Self

The text of positive infinity.

Source

pub fn positive_sign(&self) -> &str

The sign of positive numbers.

Source

pub fn set_positive_sign(&mut self, value: impl Into<String>)

The sign of positive numbers.

Source

pub fn with_positive_sign(self, value: impl Into<String>) -> Self

The sign of positive numbers.

Source§

impl NumberFormatInfo

Source

pub fn currency_decimal_digits(&self) -> i32

The number of decimal places of currency values.

Source

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).

Source

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.

Source

pub fn currency_negative_pattern(&self) -> i32

The pattern of negative currency values (0 is ($n), 1 is -$n).

Source

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).

Source

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.

Source

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 $).

Source

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).

Source

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.

Source

pub fn number_decimal_digits(&self) -> i32

The number of decimal places of numbers.

Source

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).

Source

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.

Source

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 -).

Source

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).

Source

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.

Source

pub fn percent_decimal_digits(&self) -> i32

The number of decimal places of percent values.

Source

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).

Source

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.

Source

pub fn percent_negative_pattern(&self) -> i32

The pattern of negative percent values (0 is -n %, 1 is -n%).

Source

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).

Source

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.

Source

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).

Source

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).

Source

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

Source

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.

Source

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).

Source

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.

Source

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.

Source

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).

Source

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.

Source

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.

Source

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).

Source

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

Source

pub fn new() -> NumberFormatInfo

Format information with the values of the invariant culture (C# new NumberFormatInfo()).

Source

pub fn invariant_info() -> Rc<NumberFormatInfo>

The format information of the invariant culture.

Source

pub fn current_info() -> Rc<NumberFormatInfo>

The format information of the current culture.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NumberFormatInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NumberFormatInfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl MarkupTyped for NumberFormatInfo

Source§

const MARKUP: &'static MarkupType

The markup metadata of the type.
Source§

impl PartialEq for NumberFormatInfo

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyValue for T
where T: PartialEq + 'static,

Source§

fn any_value_as_any(&self) -> &(dyn Any + 'static)

Source§

fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool

Source§

fn any_value_type_name(&self) -> &'static str

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> PropertyValue for T
where T: Clone + PartialEq + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.