Struct amfnengine::core::list_locale::ListLocale [−]
Implementations
impl ListLocale
List of locales implementation.
pub fn new() -> ListLocale
pub fn add_locale(
&mut self,
locale_str_param: &str,
currency_code_param: &str,
decimal_digits_param: usize,
date_in_format_param: ElemLocaleFormat,
date_out_format_param: ElemLocaleFormat,
resources_param: HashMap<String, String>
)
&mut self,
locale_str_param: &str,
currency_code_param: &str,
decimal_digits_param: usize,
date_in_format_param: ElemLocaleFormat,
date_out_format_param: ElemLocaleFormat,
resources_param: HashMap<String, String>
)
Add a new locale to the locale list.
Arguments
locale_str_param
- ISO language code (ISO 639)_ISO country code (ISO 3166).currency_code_param
- ISO currency code (ISO 4217).decimal_digits_param
- Currency decimal digits.date_in_format
- Date in format.date_out_format
- Date out format.resources_param
- Resources hash map.
pub fn copy(&self) -> ListLocale
Copy the locale list and return a new locale list.
Arguments
event
- Check event level.
Return
- See description.
pub fn list(&self) -> &Vec<ElemLocale>
pub fn list_mut(&mut self) -> &mut Vec<ElemLocale>
pub fn clear(&mut self)
Clear all locales selects.
pub fn locale_str(&self, event: bool) -> &str
pub fn currency_code(&self, event: bool) -> &str
pub fn decimal_digits(&self, event: bool) -> usize
pub fn format_in(&self, event: bool) -> &ElemLocaleFormat
pub fn format_out(&self, event: bool) -> &ElemLocaleFormat
pub fn resources(&self, event: bool) -> &HashMap<String, String>
pub fn user_locale(&self) -> &ElemLocale
pub fn cashflow_locale(&self) -> &ElemLocale
pub fn event_locale(&self) -> &ElemLocale
pub fn cashflow_currency_code(&self) -> &str
pub fn event_currency_code(&self) -> &str
pub fn format_date(&self, val: usize) -> String
Format and return a date string.
Arguments
val
- The usize date value to format.
Return
- See description.
pub fn format_integeri(&self, val: i32) -> String
Format and return an integer string.
Arguments
val
- The i32 value to format.
Return
- See description.
pub fn format_integer(&self, val: usize) -> String
Format and return an integer string.
Arguments
val
- The usize value to format.
Return
- See description.
pub fn format_decimal(&self, val: Decimal) -> String
Format and return a decimal string.
Arguments
val
- The decimal value to format.
Return
- See description.
pub fn format_currency(&self, val: Decimal, decimal_digits: usize) -> String
Format and return a currency string.
Arguments
val
- The decimal value to format.decimal_digits
- The number of decimal digits to round.
Return
- See description.
pub fn get_locale_index(&self, event: bool) -> usize
pub fn get_locale(&self, event: bool) -> &ElemLocale
pub fn get_locale_str(&self, event: bool) -> &str
pub fn get_resource(&self, key: &str) -> &str
pub fn select_user_locale(&mut self, locale_str_param: &str)
pub fn select_cashflow_locale(&mut self, locale_str_param: &str)
pub fn select_event_locale(&mut self, locale_str_param: &str)
Trait Implementations
impl Default for ListLocale
List of locales default implementation.
Auto Trait Implementations
impl !RefUnwindSafe for ListLocale
impl Send for ListLocale
impl !Sync for ListLocale
impl Unpin for ListLocale
impl UnwindSafe for ListLocale
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,